-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanLaravel.sh
59 lines (47 loc) · 874 Bytes
/
cleanLaravel.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
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
composer -v > /dev/null 2>&1
RES=$?
if [[ $RES -ne 0 ]]; then
echo 'Composer is not installed !'
exit 1
else
echo 'Composer is installed'
fi
which php > /dev/null 2>&1
RES=$?
if [[ $RES -ne 0 ]]; then
echo 'PHP is not installed'
exit 1
else
echo 'PHP is installed'
fi
CMDCOMPOSER="composer"
CMDARTISAN="php artisan"
$CMDCOMPOSER clear-cache
$CMDCOMPOSER dump-autoload
echo
echo "Clear Cache facade value:"
STMT="cache:clear"
$CMDARTISAN $STMT
echo "Cache facade value cleared."
echo
echo "Clear compiled pages:"
STMT="clear-compiled"
$CMDARTISAN $STMT
echo
echo "Clear views cache:"
STMT="view:clear"
$CMDARTISAN $STMT
echo
echo "Clear config cache:"
STMT="config:cache"
$CMDARTISAN $STMT
echo
echo "Clear Route cache:"
STMT="route:clear"
$CMDARTISAN $STMT
exit 1
echo
echo "Route cache:"
STMT="route:cache"
$CMDARTISAN $STMT