# Complete Commands to Run Laravel Portfolio Project (Windows PowerShell) # Updated with all commands used to fix and run the project # ======================================== # 1. INITIAL SETUP COMMANDS # ======================================== # Clone the repository git clone cd # Install PHP dependencies composer install # Create .env file with proper configuration @" APP_NAME="Protik Goswami Portfolio" APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://localhost:8000 LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=sqlite DB_DATABASE=database/database.sqlite BROADCAST_DRIVER=log CACHE_STORE=file FILESYSTEM_DISK=local QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 "@ | Out-File -FilePath .env -Encoding utf8 # Generate application key php artisan key:generate # ======================================== # 2. DATABASE SETUP COMMANDS # ======================================== # Run migrations and seeders php artisan migrate --seed # If you encounter database errors, rollback and re-run: # php artisan migrate:rollback --step=1 # php artisan migrate # Create storage link php artisan storage:link # ======================================== # 3. FRONTEND SETUP COMMANDS # ======================================== # Install Node.js dependencies npm install # Build frontend assets npm run build # ======================================== # 4. SERVER START COMMANDS # ======================================== # Start Laravel development server php artisan serve --host=0.0.0.0 --port=8000 # Alternative: Use setup.bat script # cmd /c setup.bat # ======================================== # 5. TROUBLESHOOTING COMMANDS # ======================================== # Clear all caches php artisan config:clear php artisan cache:clear php artisan view:clear # Rebuild config cache php artisan config:cache # Check application status # try { $response = Invoke-WebRequest -Uri "http://localhost:8000" -UseBasicParsing; Write-Host "Status: $($response.StatusCode)" } catch { Write-Host "Error: $($_.Exception.Message)" } # ======================================== # 6. ADMIN ACCESS INFORMATION # ======================================== # Admin Panel: http://localhost:8000/admin # Email: admin@portfolio.com # Password: admin123 # ======================================== # 7. QUICK FIX COMMANDS (if needed) # ======================================== # Fix profile image settings table (if error occurs): # php artisan migrate:rollback --step=1 # php artisan migrate # Force re-seed database: # php artisan migrate:fresh --seed # Check database status: # php artisan migrate:status php artisan migrate php artisan storage:link php artisan config:clear php artisan cache:clear php artisan migrate # ======================================== # 8. RUN WITH DOCKER (OPTIONAL) # ======================================== # Prerequisites: Docker Desktop running # 1) Ensure SQLite file exists # - PowerShell: if (!(Test-Path "database/database.sqlite")) { New-Item -ItemType File database/database.sqlite | Out-Null } # 2) Build and start # docker compose up -d --build # 3) Install dependencies (first run only) # docker compose exec app composer install # docker compose exec app php artisan key:generate # docker compose exec app php artisan migrate --seed # 4) Open site # http://localhost:8080