The purpose of this bash script is to automataclly start up or shutdown a laravel sail project with docker.
To run this script follow these instructions:
$ chmod +x laravel.sh
read -p "Enter The App you want to Start: [$APPNAME_DEFAULT/] " APPNAME
if [[ $APPNAME == "" ]]
# check if directory exists
if [ ! -d "$APPNAME" ]; then
echo "FATAL FERROR: $APPNAME DOES NOT EXIST. Try Again."
echo "[OK] App was found: $APPNAME"
read -p "App Action: up/down [$STATUS_DEFAULT/] " STATUS
if [[ $STATUS == "" ]]
if [[ $STATUS == STATUS_DEFAULT ]]
# ALWAYS PUT THIS AT THE END OF THE SCRIPT
echo "Opening browser with localhost"