mardi 6 octobre 2015

Laravel: ErrorException guraded vs fillable

Laravel: ErrorException in Model.php line 2336: in_array() expects parameter 2 to be array, string given

class Student extends Model { protected $guarded = 'student_id';

//protected $fillable = ['full_name', 'current_grade','branch']; }

should I use fillable ? because when I use guarded alone its throwing this error



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire