Setup Laravel project after cloning

  1. run composer install to generate depedencies in vendor folder
  2. change .env.example to .env
  3. run php artisan key:generate
  4. configure .env

Windows

Go to the project folder
Shift+Right Click -> Open command window here

Mac

Open Terminal, Type “cd ” (with a space)
From finder, Drag the project folder
Press Enter to go inside the project folder

Compose

composer install

Generate Key

php artisan key:generate

Setup Database

Open the file .env
(Assuming wamp or xampp)
Edit values to match your database
Add empty database using phpmyadmin
Include that name in the DB_DATABASE

DB_HOST=localhost
DB_DATABASE=students_data
DB_USERNAME=root
DB_PASSWORD=

Get Tables

php artisan migrate

Get default/initial/dummy table values

php artisan db:seed

Run the project

php artisan serve

1. clone the repo
git clone <l_repo>

2. go into the repo
cd l_repo

3. install require packages
composer install

4. generate the laravel project key
php artisan key:generate

5. migrate and seed at the same time
php artisan migrate:fresh --seed

6A. convert “.env.example” to “.env”

6B. change the ‘database name’ & ‘username’ & ‘password’
DB_HOST=localhost DB_DATABASE=own_databse_name DB_USERNAME=root DB_PASSWORD=

7. Change the file upload limit for php.ini
upload_max_filesize = 4G post_max_size = $4G

8. Link with storage
php artisan storage:link

9. start the server
php artisan serve

Leave a comment