FTXInfotech / laravel-adminpanel

A Laravel Admin Panel (Laravel Version : 6.0)
967 stars 461 forks source link

Self Relation - Parent & child in the same table not work #303

Closed baduypaltalk closed 5 years ago

baduypaltalk commented 5 years ago

Hi,

I would like to build a Create View for 'Company' module, which has a 'selectbox' sames as the 'BlogModule.Category'.

blog-create-module

My steps:

Please see the attached images: table database ( focus the relation of fields id - parent_id) and other attached images . And tell me how to build the this select box for "Parent Id" field.

Many thanks.

create_controller create_response edit_response

Blade view:

form-blade model_company_relation model-company table_companies

bvipul commented 5 years ago

In CreateResponse, I don't see if you have passed the array of companies, just like we have passed tags and categories to the CreateResponse

bvipul commented 5 years ago

Look at BlogsController for more reference, if still its not resolved, if you have the project on github, please send me the link, I will try to solve it in your repo.

baduypaltalk commented 5 years ago

@bvipul thanks you.

I've implemented it done.