eloquent - How to select one column clumn from table and all records from relation table [Laravel 5] -
i have eloquent query this:
project::with('tasks')->get([]);
i need take projects
table 1 coulmn 'name' , tasks
wana all...
anyone know how acomplish it?
in order able load tasks, need load project's id:
$projects = project::with('tasks')->get(['id', 'name']);
Comments
Post a Comment