I'm create a script to start my Laravel 5.8 project
#Install dependencies
composer self-update
composer install
# create .env base on .env.example
cat .env.example > .env
#permission
chmod -R 777 .env
#create the key
php artisan key:generate --force
cat .env
#set permission
chmod -R 777 bootstrap/ vendor/ storage/ public/
sleep 1
#clear cache
php artisan config:cache
php artisan cache:clear
composer dump-autoload
php artisan clear-compiled
php artisan key:generate
python -mwebbrowser http://127.0.0.1:8000
php artisan serve
This line does not seem to work.
php artisan key:generate --force
Look at my .env
⚡️ bheng cat .env
APP_ENV=local
APP_URL=http://bheng.test/
APP_DEBUG=true
APP_KEY=***
CODE=###
#---------------------------------------------- DATABASE
DB_CONNECTION=mysql
DB_HOST=4.2.2.1
DB_DATABASE=b
DB_USERNAME=dev
DB_PASSWORD=123
DB_PORT=3306
#---------------------------------------------- EMAIL
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_FROM=8863b0c62fbcff
MAIL_PASSWORD=***
#----------------------------------------------
GOOGLE_WEB_API_KEY=***
Update
⚡️ bheng php artisan key:generate --force
Application key set successfully.
⚡️ bheng cat .env | grep KEY
APP_KEY=***
GOOGLE_WEB_API_KEY=***
⚡️ bheng ls
Procfile composer.lock package-lock.json readme.md storage/
app/ config/ package.json resources/ vendor/
artisan database/ phpspec.yml routes/
bootstrap/ gulpfile.js phpunit.xml server.php
composer.json npm-debug.log public/ start.sh*
⚡️ bheng L
total 1584
drwx------+ 25 bheng staff 800B Oct 13 13:55 ../
-rw-r--r-- 1 bheng staff 796B Oct 13 13:55 .env.example
-rw-r--r-- 1 bheng staff 61B Oct 13 13:55 .gitattributes
-rw-r--r-- 1 bheng staff 556B Oct 13 13:55 .gitignore
drwxr-xr-x 7 bheng staff 224B Oct 13 13:55 .idea/
-rw-r--r-- 1 bheng staff 43B Oct 13 13:55 Procfile
drwxr-xr-x 26 bheng staff 832B Oct 13 13:55 app/
-rw-r--r-- 1 bheng staff 1.6K Oct 13 13:55 artisan
drwxr-xr-x 7 bheng staff 224B Oct 13 13:55 bootstrap/
-rw-r--r-- 1 bheng staff 1.3K Oct 13 13:55 composer.json
-rw-r--r-- 1 bheng staff 200K Oct 13 13:55 composer.lock
drwxr-xr-x 17 bheng staff 544B Oct 13 13:55 config/
drwxr-xr-x 6 bheng staff 192B Oct 13 13:55 database/
-rw-r--r-- 1 bheng staff 1.6K Oct 13 13:55 gulpfile.js
-rw-r--r-- 1 bheng staff 13K Oct 13 13:55 npm-debug.log
-rw-r--r-- 1 bheng staff 515K Oct 13 13:55 package-lock.json
-rw-r--r-- 1 bheng staff 1.0K Oct 13 13:55 package.json
-rw-r--r-- 1 bheng staff 87B Oct 13 13:55 phpspec.yml
-rw-r--r-- 1 bheng staff 777B Oct 13 13:55 phpunit.xml
drwxr-xr-x 20 bheng staff 640B Oct 13 13:55 public/
-rw-r--r-- 1 bheng staff 2.5K Oct 13 13:55 readme.md
drwxr-xr-x 5 bheng staff 160B Oct 13 13:55 resources/
drwxr-xr-x 5 bheng staff 160B Oct 13 13:55 routes/
-rw-r--r-- 1 bheng staff 560B Oct 13 13:55 server.php
-rwxr-xr-x 1 bheng staff 957B Oct 13 13:55 start.sh*
drwxr-xr-x 5 bheng staff 160B Oct 13 13:55 storage/
drwxr-xr-x 12 bheng staff 384B Oct 13 13:55 .git/
drwxr-xr-x 45 bheng staff 1.4K Oct 13 13:55 vendor/
drwxr-xr-x 30 bheng staff 960B Oct 13 13:55 ./
-rwxr-xr-x 1 bheng staff 796B Oct 13 13:56 .env*
⚡️ bheng