How to set up a Laravel project from Git

ยท

1 min read

First clone the repository

git clone -b <BRANCH_NAME> <REPO_URL> <FOLDER_NAME>

Install required packages

composer install --no-scripts
composer install --optimize-autoloader

If required*

npm install

Change dir permission

sudo chmod 777 -R bootstrap
sudo chmod 777 -R storage

Create .env

mv .env.example .env

Generate new key

php artisan key:generate
php artisan storage:link

Clear cache and optimize

php artisan optimize:clear
php artisan optimize

How to run (local)

php artisan server --port=8000
ย