Skip to content

Instantly share code, notes, and snippets.

@mul14
Last active March 19, 2016 09:40
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mul14/6ad480c87b3ba73e1cca to your computer and use it in GitHub Desktop.
Save mul14/6ad480c87b3ba73e1cca 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