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
 
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM