-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
25 lines (24 loc) · 958 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# With this script you can initialize from scratch this Laravel project in Linux/macOS
# Installing dependencies without any interaction and output
composer install --no-interaction --quiet
# Creating the .env file, and generating a new application key
# The .env.example file in the starter kit contains all the necessary modifications, so we can use it
# It is not necessary to rewrite the DB configuration
cp .env.example .env
php artisan key:generate
# Installing JavaScript dependencies quietly
npm install --silent
# Generate front-end assets
npm run prod
# Creating an empty database file to make migartions run: database/database.sqlite
touch database/database.sqlite
# Creating a fresh migration
php artisan migrate:fresh
# Seed the database
php artisan db:seed
# Prepare a folder for file upload
mkdir ./storage/app/public
# Creating a symlink: /public/storage --> /storage/app/public
php artisan storage:link
# Starting the app
php artisan serve