post修改数据的时候,返回的错误状态

laravel 填坑 to fillable property to allow mass assignment on

解决方法:在对应的model里面添加对应的字段即可

<?php

namespace App\Api\Models;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    // 加上对应的字段
    protected $fillable = ['name', 'email'];
}

相关文章:

  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2021-05-23
  • 2021-10-20
  • 2022-12-23
  • 2021-05-04
猜你喜欢
  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2022-02-06
  • 2021-06-26
  • 2022-12-23
  • 2021-09-07
相关资源
相似解决方案