Skip to content

Instantly share code, notes, and snippets.

@devgeek27
Last active January 10, 2016 23:38
Show Gist options
  • Save devgeek27/89768f6e26830c50cea2 to your computer and use it in GitHub Desktop.
Save devgeek27/89768f6e26830c50cea2 to your computer and use it in GitHub Desktop.
Create new project for Laravel 5
#!/bin/sh
# Get the project name
PROJECT_NAME=${1:-laravel}
# Install Laravel
laravel new $PROJECT_NAME
# Change to the project directory
cd $PROJECT_NAME
# Rename .env.example to .env
mv .env.example .env
# Generate application key
php artisan key:generate
# Remove Laravel related Markdown
rm -f readme.md
# Configure folder permissions
find storage/* -type d -exec chmod 775 {} \;
# Create a new Git repository
git init && git add . && git commit -m "Initial Laravel setup"
# Set application namespace
php artisan app:name $PROJECT_NAME
# Generating autoload files
composer dump-autoload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment