How to bind relationship model in form
Hi everyone I'm new in laravel development and I'm kinda stuck with this problem. Before this, i'll give you details of what I'm trying to do.
I have two table Associates and Licenses table and Associates has one relationship with Licenses so it's a one to one relationship. I have two views create and edit, create view is working fine for me but to edit it is not. Since i have relationship i bind my model to my view using the Associate model only then access the relationship property for license, $associate->license->property1... etc. but the thing is i have a Form:file control in my view and this is the code {{ Form::file('picture', ['class' => 'image']) }} hence picture is a property of License model. whenever I tried to submit the form it always gives me null value for this property as I know that it did not capture but how can I achieve to handle this. I tried {{ Form::file('picture', ['class' => 'image']) }} but it didn't work.
Please or to participate in this conversation.