laravel5.8的使用

首先,确定电脑已经安装了composer。最好是全局安装

然后打开phpstorm的控制台:

composer create-project --prefer-dist laravel/laravel blog另外一种方式步骤多。然后中间配置的地方又多,不推荐。

artisan

在Laravel根目录下运行: PHP artisan list可查看所有命令列表。

下面列举部分比较常用的命令:

启用维护模式:php artisan down --message='Upgrading Database' --retry=60

关闭维护模式:php artisan up

生成路由缓存:php artisan route:cache

清除路由缓存:php artisan route:clear

数据库迁移 Migrations:php artisan make:migration create_users_table --create=users

创建资源控制器:php artisan make:controller PhotoController --resource --model=Photo

创建模型及迁移:php artisan make:model User -m


生成控制器文件 php artisan make:controller  MemberC
ontroller
 
 
原文地址:https://www.cnblogs.com/cici1989/p/10595016.html