jeudi 28 février 2019

Retrieve fillable fields in Laravel

In laravel 5.4, I'm able to retrieve fillable fields by using fillable index of model instance.

$model = new AnyClass();
dd($model['fillable']);

The above code prints all fillable fields of AnyClass. But the same code prints null on laravel 5.6. I know I can retrieve fillable fields using $model->getFillable(). My question is what is the reason / why it is not working in laravel 5.6 but works in 5.4?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2EiIhOD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire