jeudi 12 juillet 2018

Laravel-Backpack Getting data of 2 tables by join

I'm new using backpack for laravel and I'm trying to understand how could show data from DB in the default view that backpack use to display rows. I already read the documentation from the site but it's really poor, and have a lot of questions.

I have 2 models linked by join, for example:

Table 1                 Table 2
-id                      -id
-name                    -phone
-age                     -description
-table2_id

How can I display the attributes from table 2 in table 1 list view?. Backpack haves this view to list elements of modules

backpack-list-view

I want to see on that table the combination of the 2 tables...Any code that could help me ?. Thank you for your help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire