Skip to content

Instantly share code, notes, and snippets.

@surahmans
Forked from mul14/laravel-new.sh
Created March 19, 2016 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surahmans/0a125e6c8a47ba8b2c17 to your computer and use it in GitHub Desktop.
Save surahmans/0a125e6c8a47ba8b2c17 to your computer and use it in GitHub Desktop.
Simple script to create Laravel project and cd into target directory. Put this script in your bashrc or zshrc file.
laravel-new() {
if [ -z "$1" ]; then
cat << EOF
Please provide a directory name.
Usage:
laravel-new [directory-name]
EOF
return;
fi
echo "Please wait...";
composer --quiet create "laravel/laravel" "$1";
cd "$1";
touch "./database/database.sqlite";
php artisan cache:table
php artisan queue:failed-table
php artisan queue:table
php artisan session:table
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment