-
Notifications
You must be signed in to change notification settings - Fork 0
/
installaravel
executable file
·82 lines (79 loc) · 2.7 KB
/
installaravel
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
while true; do
clear
echo "==============================="
echo " Main Menu "
echo "==============================="
echo "1. Laravel"
echo "2. Laravel With Livewire"
echo "3. Laravel Breeze Blade"
echo "4. Quit"
read -p "Enter your choice [1-4]: " choice
case $choice in
1)
read -p "Enter Website Name : " webname
composer create-project laravel/laravel $webname
exit 0
;;
2)
read -p "Enter Website Name : " webname
composer create-project laravel/laravel $webname
wait
cd $webname
composer require livewire/livewire
php artisan livewire:layout
php artisan livewire:publish --config
exit 0
;;
3)
read -p "Enter Website Name : " webname
composer create-project laravel/laravel $webname
cd $webname
composer require laravel/breeze --dev
php artisan breeze:install blade
php artisan migrate
wait
perintah_anda="php artisan serve; exec bash"
terminal_emulators=("gnome-terminal" "konsole" "xterm" "mate-terminal" "xfce4-terminal" "terminator")
for terminal in "${terminal_emulators[@]}"; do
if command -v "$terminal" &> /dev/null; then
"$terminal" -- bash -c "$perintah_anda"
fi
done
echo "Run 'php artisan serve' manually."
cd $webname
npm install
npm run dev
exit 0
;;
4)
read -p "Enter Website Name : " webname
composer create-project laravel/laravel $webname
cd $webname
composer require laravel/breeze --dev
php artisan breeze:install livewire
php artisan migrate
wait
perintah_anda="php artisan serve; exec bash"
terminal_emulators=("gnome-terminal" "konsole" "xterm" "mate-terminal" "xfce4-terminal" "terminator")
for terminal in "${terminal_emulators[@]}"; do
if command -v "$terminal" &> /dev/null; then
"$terminal" -- bash -c "$perintah_anda"
fi
done
echo "Run 'php artisan serve' manually."
cd $webname
npm install
npm run dev
exit 0
;;
5)
echo "Quit...."
exit 0
;;
*)
echo "Invalid choice. Please enter a number between 1 and 4."
read -p "Press enter to continue..."
;;
esac
done