dousikuai5417 2017-05-25 20:03 采纳率: 0%
浏览 36
已采纳

Backpack / Laravel CRUD没有“添加新的”

I have installed Backpack/Laravel in my project, evrything works well so far, but not when I tried to add a new "Product" it throws the MasAssignamentException:

MassAssignmentException in Model.php line 232: nombre

Where "nombre" is the field in my database, I know that is because Laravel needs de $fillabe variable, but where to set it or where to configure that to not getting that error.

  • 写回答

2条回答 默认 最新

  • dourao3960 2017-05-25 20:06
    关注

    in your model .. you should have a fillable variable .. like

    protected $fillable = [
        'nombre', 'somefield',
    ];
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?