I want to get Data if join table not null so i do a query like this
$projects = Project::
with(array('owner'=> function($query) use ($request){
$query->where('owner_id',$request->input('owner_id'));
}))->with('plans')->get();
i get all projects with owners if not null and plans but, i want to get projects if owners not null
so if owner null i want not get project i want to get null [] .
How to resolve this issue and thanks
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qPyyJR
via IFTTT
Aucun commentaire:
Enregistrer un commentaire