这个涌如今利用模型save()或者update()的利用
办理:在对应得模型文件里面
public function fromDateTime($value)

{
return empty($value) ? $value : $this->getDateFormat();
}
2、涌现下面的缺点,是利用create批量添加报的错
办理办法:在对应得模型中添加
protected $fillable = ['name', 'age', 'sex'];
3、涌现以下问题
Sorry, the page you are looking for could not be found.
办理:一样平常是没加路由,或者路由缺点,在或者便是没有模板
4、The page has expired due to inactivity.Please refresh and try again.
办理方法:{{ csrf_field() }} 表单验证
5、在linux下面app/public(如果上传文件在这个目录)/stotage 都给权限
6、利用composer下面安装第三方类库的时候涌现下面问题
[RuntimeException]
/home/wwwroot/lar.simengphp.cn/vendor/psr/http-message does not exist and could not be created.
办理方法:composer dump-autoload
[ErrorException]
file_put_contents(/home/wwwroot/lar.simengphp.cn/vendor/composer/autoload_namespaces.php): failed
to open stream: Permission denied
办理方法:
以上都是linux下权限问题,项目vender没有权限
r:read便是读权限 --数字4表示
w:write便是写权限 --数字2表示
x:excute便是实行权限 --数字1表示
读、写、运行三项权限可以用数字表示,便是r=4,w=2,x=1。以是,-rw-r--r--用数字表示成644。
7、Class config does not exist in
缘故原由是我的.env里面的参数设置有空格。。。有空格的参数一定要用双引号包起来
8、1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `db_u
sers` add unique `users_email_unique`(`email`))
Laravel 5.4+默认利用utf8mb4字符编码,而不是之前的utf8编码。因此运行php artisan migrate 会涌现如下缺点:
你可以通过调用 AppServiceProvider 中的 Schema::defaultStringLength 方法来配置它
/
勾引任何运用程序做事。
@return void
/
public function boot()
{
Schema::defaultStringLength(191);
}