I have relationship between article and translations, but how can i get that in comment?
$comments = ArticleComments::orderBy('created_at','desc')->with('user')->with('article')->with('translations')->paginate(10);
I tried this also
$comments = ArticleComments::orderBy('created_at','desc')->with('user')->with('article')->with('translations')->whereHas('translations',function($query) use($default_language_id){
$query->where('language_id','=',$default_language_id);
})->paginate(10);
Any suggestion? I get articles but not theirs translations...
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2k0KQgw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire