Last active
January 10, 2016 23:38
-
-
Save devgeek27/89768f6e26830c50cea2 to your computer and use it in GitHub Desktop.
Create new project for Laravel 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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