environment
PHP 7.0
Create project
$ install composer 【这个命令一般都很慢,需要翻墙去下载composer,然后安装】
$ composer create-project --prefer-dist laravel/laravel 项目名 【创建项目】
$ composer install【安装laravel扩展包】
use
Note that to use the artisan command, you need to use it in the current directory of the project
1. Create a controller using artisan
$ php artisan make:controller Admin/LoginController
2. middleware
$ php artisan make:middleware CheckAge
// check routes
// in route,use ‘Route::resources’ to create a group routes
3. View routing
$php artisan route:list
// create rule request
php artisan make:request StoreBlogPost
// create model
4. Create a model
$php artisan make:model Http/Models/Admin/Auth