Installing specific laravel version with composer create-project

后端 未结 7 1151
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 03:23

The fastest and simplest way of installing Laravel is via composer command. From the laravel docs (http://laravel.com/docs/quick), it shows that we can install it with this:

相关标签:
7条回答
  • 2020-11-28 03:55

    Try via Composer Create-Project

    You may also install Laravel by issuing the Composer create-project command in your terminal:

    composer create-project laravel/laravel {directory} "5.0.*" --prefer-dist
    
    0 讨论(0)
  • 2020-11-28 03:57
    composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist
    

    And then you probably need to install all of vendor packages, so

    composer install
    
    0 讨论(0)
  • 2020-11-28 04:05

    Installing specific laravel version with composer create-project

    composer global require laravel/installer

    Then, if you want install specific version then just edit version values "6." , "5.8."

    composer create-project --prefer-dist laravel/laravel Projectname "6.*"

    Run Local Development Server

    php artisan serve

    0 讨论(0)
  • 2020-11-28 04:07

    From the composer help create-project command

    The create-project command creates a new project from a given
    package into a new directory. If executed without params and in a directory with a composer.json file it installs the packages for the current project.
    You can use this command to bootstrap new projects or setup a clean
    version-controlled installation for developers of your project.

    [version]
    You can also specify the version with the package name using = or : as separator.

    To install unstable packages, either specify the version you want, or use the --stability=dev (where dev can be one of RC, beta, alpha or dev).

    This command works:

    composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist
    

    This works with the * notation.

    0 讨论(0)
  • 2020-11-28 04:12

    To install specific version of laravel try this & simply command on terminal

    composer create-project --prefer-dist laravel/laravel:5.5.0 {dir-name}
    
    0 讨论(0)
  • 2020-11-28 04:19

    Have a look:

    Laravel 4.2 Documentation

    Syntax (Via Composer):

    composer create-project laravel/laravel {directory} 4.2 --prefer-dist
    

    Example:

    composer create-project laravel/laravel my_laravel_dir 4.2
    

    Where 4.2 is your version of laravel.

    Note: It will take the latest version of Laravel automatically If you will not provide any version.

    0 讨论(0)
提交回复
热议问题