-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
47 lines (39 loc) · 1.05 KB
/
install.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
echo 'Enter Your Project Name : '
read project_name
if [ "$project_name" = "" ]; then
project_name="blog"
fi;
composer create-project --prefer-dist laravel/laravel $project_name
#Into Project folder
cd $project_name
cp .env.example .env
sudo chmod -R 0777 storage/
sudo chmod -R 0777 bootstrap/cache/
php artisan key:generate
echo 'Do you need Auth Scaffolding : Y/N'
read authr
if [ "$authr" = "Y" ]; then
php artisan make:auth
echo 'Do you want to Migrate the DB : Y/N'
read dbmig
if [ "$dbmig" = "Y" ]; then
echo 'DB Name : '
read dbname
echo 'DB User : '
read dbuser
echo 'DB Pass : '
read dbpass
sed -i -e "s/.*DB_DATABASE.*/DB_DATABASE="$dbname"/" .env
sed -i -e "s/.*DB_USERNAME.*/DB_USERNAME="$dbuser"/" .env
sed -i -e "s/.*DB_PASSWORD.*/DB_PASSWORD="$dbpass"/" .env
php artisan migrate
fi;
fi;
mv server.php index.php
cp public/.htaccess .htaccess
echo "Laravel Installation Successfully done "
echo "Do you want to Install the debugger :"
read dbug
if [ "$dbug" = "Y" ]; then
composer require barryvdh/laravel-debugbar --dev
fi;