Skip to content
Advertisement

How to display a table according to a foreign key which is display from another foreign key / Laravel 6

Model:

JavaScript

follow_up.id_priority is a foreign key to priority.id

Controller:

JavaScript

Piece of the json data I got returned :

JavaScript

Could you please explain me how to display the table priority according to the foreign key which is id_priority ?

Okay… there’s a misunderstanding, so here’s the result i’m trying to get :

JavaScript

Advertisement

Answer

You can call a closure function on with method:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement