get Tasks that has multi Tags

Posted 3 months ago by Kareimovich

Hi, everybody, I need to get tasks that have more than 1 tag but the problem is I can't do this with a relation of relation

          $tasks = Path::with('pathtags.Tasks.tasktags')->first();

the relation (pathtags.Tasks) gave me tasks associated with tags and (taskstags) gave me all task tags

I tried

    $tasks = Path::with('pathtags.Tasks.tasktags')->has('pathtags.Tasks.tasktags','>',1)->get();

but didn't Work


Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.