Installing specific laravel 5 version with composer create-project

前端 未结 3 920
情深已故
情深已故 2021-02-06 08:09

Today I try to install specific laravel version with composer create-project laravel/laravel=5.1.8 your-project-name --prefer-dist, because some of the plugins have

相关标签:
3条回答
  • 2021-02-06 08:48

    you can do:

    composer create-project laravel/laravel myproject --prefer-dist v5.1.8
    

    To see available versions, you can visit its packagist page (lower right):

    https://packagist.org/packages/laravel/framework

    UPDATED:

    There is no actually a tag for v5.1.8 for package laravel/laravel, Your issue is the framework(core) of laravel..

    What you can do to solve it is to edit your composer.json:

    "require": {
            "php": ">=5.5.9",
            "laravel/framework": "5.1.8"
        },
    

    And do composer update "laravel/framework"

    0 讨论(0)
  • 2021-02-06 08:48

    Use the following command:

    composer create-project laravel/laravel my_project 5.1.8
    

    You can also specify a version and up, for example 5.1 and its patches, like so (recommended):

    composer create-project laravel/laravel my_project 5.1.*
    
    0 讨论(0)
  • 2021-02-06 08:56

    A simple answer i can think of is

    composer create-project laravel/laravel <app name> "5.1.*"
    

    Just replace < app name > with your application name and you'll install laravel's 5.1 distribution.

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