Laravel- create a new project

 The following is our standard operating procedure to create a new project Laravel.

Create Project

First, create an empty project on gitlab, a name is called: xproject.

Then create project Laravel locally. In order to make the process of creating more smoothly, it is recommended to use packgist mirrored Ali cloud provides.

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer create-project --prefer-dist laravel/laravel xproject

Use git to manage this local project, and add a remote repository created earlier. Note .gitignore inside the IDE project files added to it, not its version management.

git init
git add .
git commit -m "init"
git remote add origin https://xxx.xxx.xxx/xxx/xproject.git
git push origin master

Note that, Laravel project root directory by default comes .gitignore files, so at this time to submit up the project file is incomplete. If someone from a remote repository clone project down, can not be directly used, need to use this command to obtain additional files are not git management.

composer install

 

After the format is to be defined return value api, detailed below:

https://www.cnblogs.com/zhaoxizhe/p/11308139.html

 

Guess you like

Origin www.cnblogs.com/zhaoxizhe/p/11271001.html