mercredi 24 octobre 2018

Laravel collective multi word model name on edit page

I am working with laravel version 5.5 and this is my first project with laravel. I am using Laravel collective form and I am facing a very silly issue I think. In the edit page, I am binding the model with the following code...

{!! Form::model($user, ['method'=>'PUT', 'action'=>['UsersController@update', $user->id], 'class'=>'form-horizontal', 'files'=>true]) !!}

Here I have a model named User and I can easily call the model name as $user, but in my project I have models with multi words, like JurisdictionLevel, NewsCategory and database tables are jurisdiction_levels, category_news etc. I am confused how do I now call the model name in this case. I have already tried $jurisdictionlevel, $jurisdiction_level and $jurisdictionLevel, but none of them is working. I don't know how to call model names with multiple words. Please help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire