laravel8新功能和笔记

1.模型工厂

php artisan make:factory TestFactory

 为了插入假的数据配置好文件

 

 

 输入命令

 php artisan tinker 
namespace AppModels
Test::Factory()->count(10)->create()

这样就在表里创建了10条假的数据

 

2.维护模式

php artisan down --secret="internalonly"

  这样就设置了 访问密码 为 internalonly

 

 

 3.关闭维护模式

php artisan up

原文地址:https://www.cnblogs.com/F4natasy/p/14790924.html