Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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