relationshop and options dont works together

there is my code:
Select::make('brand_id')
->label('Brand')
->multiple()
// ->relationship('brand', 'name')
->searchable()
->required()
->options(Brand::all()->pluck('name', 'id'))
->preload()
->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),
]),
Select::make('brand_id')
->label('Brand')
->multiple()
// ->relationship('brand', 'name')
->searchable()
->required()
->options(Brand::all()->pluck('name', 'id'))
->preload()
->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),
]),
and error i got is :SQLSTATE[42S22]: Column not found: 1054 Unknown column 'brand_supplier.supplier_id' in 'where clause' SELECT * FROM brand_supplier WHERE brand_supplier.supplier_id = 88 its working when i comment relationship or options but together its not working. table name is supplier
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server