Multiple Relationships

i just wanna know that is this the standard way to handle multiple relation ? i want to do a relation like this : admin -> user ->roles there is 3 diffrent resource . what i did is this and it woks so good but i just wanna make sure this is the currect way or not: AdminResource forms
Grid::make('hi')
->relationship('user')
->schema([
Select::make('roles')
->label(trans('user.roles'))
->relationship('roles', 'name')
->multiple()
->preload()
->searchable(),
])->columnSpan(1),
])->columns(4);
Grid::make('hi')
->relationship('user')
->schema([
Select::make('roles')
->label(trans('user.roles'))
->relationship('roles', 'name')
->multiple()
->preload()
->searchable(),
])->columnSpan(1),
])->columns(4);
i have to repeat that : this code works perfectly i just wanna know is this standard and currect or not !
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server