1
I wonder if I can create a model that returns the result of more than one table in Laravel.
1
I wonder if I can create a model that returns the result of more than one table in Laravel.
0
Each model, as a rule, will be a table, I recommend using Relationship:
https://nova.laravel.com/docs/1.0/resources/relationships.html#relationships
0
First it is worth mentioning that each model is responsible for a table in Laravel.
There are ways you can do this but with different tools, you can see here in this link from S.O itself(In English), more details on how to do this.
You can create an auxiliary table and recover the data with the Relationships of the Variable.
Anyway, there are several ways you can recover this information, just take a look at the documentation and go testing to see which one is better for your application.
Browser other questions tagged laravel model
You are not signed in. Login or sign up in order to post.
No, in a model you will treat the data of a table, and also treat the relationships of that table with others as can be seen in documentation
– Erlon Charles