spwlea
Last Updated: February 25, 2016
·
2.979K
· wolfiezero
52c8f3855bd70cec14ec5a356308a0d4

Install Laravel 4 with Ease

If you regularly create applications with Laravel 4 then you may want to add this little function to your bash_profile. It even installs composer!

# Install laravel and configure
install-laravel () {
    echo "Installing Laravel into '$1'"

    git clone https://github.com/laravel/laravel.git $1
    cd $1

    # Required for getting L4 dev
    git reset --hard HEAD
    git checkout develop

    # Do the house cleaning
    chmod -R 0777 app/storage
    php curl -s https://getcomposer.org/installer | php
    php composer.phar install
    php artisan key:generate
    rm -rf .git
}
Say Thanks
Respond

2 Responses
Add your response

4411

I edited your snippet above for L3 and composer.

# Install laravel and configure
install-laravel () {
    echo "Installing Laravel into '$1'"

    git clone https://github.com/laravel/laravel.git $1
    cd $1

    # Required for getting L4 dev
    # git reset --hard HEAD
    # git checkout develop

    # Do the house cleaning
    chmod -R 0777 storage
    curl -sS https://getcomposer.org/installer | php
    php composer.phar
    touch composer.json
    echo "{
        \"require\": {

        }
    }" > composer.json
   php composer.phar install
   php artisan key:generate
   rm -rf .git
}
over 1 year ago ·
18061
Img 2899 normal

Is 777 a good practice? Shouldn't it be 755?

over 1 year ago ·
Filed Under