How to bring the relationships of a certain model to display them in a table with Inertia::render? How to bring the relationships of a certain model to display them in a table with Inertia::render? vue.js vue.js

How to bring the relationships of a certain model to display them in a table with Inertia::render?


You should use with method in the eloquent model. For example:

$result = Model::with(['nameOfTheRelationShip'])->get();