making this one because i keep on forgetting how..
After cloning a Laravel project from GitHub, follow these steps to set it up:
1. Navigate to the Project Directory
cd your-project-folder
2. Install Dependencies
Run Composer to install PHP dependencies:
composer install
If your project uses Node.js, install frontend dependencies:
npm install
3. Set Up Environment File
Copy the example .env
file:
cp .env.example .env
Then, open .env
and configure your database settings.
4. Generate Application Key
php artisan key:generate
5. Set Up Database
Ensure your .env
file has the correct database credentials, then run:
php artisan migrate --seed
(--seed
is optional if your project includes seeders.)
6. Set File Permissions (if needed)
chmod -R 775 storage bootstrap/cache
7. Serve the Application
php artisan serve
8. (Optional) Build Frontend Assets
If your project uses Vite:
npm run dev
The step is easy enough, but sometimes..as a human; we are forgetful.