F
Filament16mo ago
Rahaf

I can view two models in one Resources

I have two models one survey and another one is user info. I want to create one table with a survey and user info ?
6 Replies
Patrick Boivin
Patrick Boivin16mo ago
What would this Table look like? Are all the columns the same between both DB tables?
ThiNha
ThiNha13mo ago
I issued the same, I have a user table and an admin table. I want to show in one Resources.
toeknee
toeknee13mo ago
That's bad database schema, if you have separated them at the root level, you should have separate viewed data. You would add a relationship if they are different, but as Patrick asked how would you lay it out.
ThiNha
ThiNha13mo ago
Thank you, I will have separate viewed data.
toeknee
toeknee13mo ago
So you want two tables ? You could do a few things, create a single resource that does nothing and has relationship managers for both sets of users. You could join in the data on the eloquent query level and have filters for admin / user You can create a custom page which renders two tables as per the Filamentdocs
ThiNha
ThiNha13mo ago
Thank you, @toeknee

Did you find this page helpful?