retrieve only identical array

Posted 7 months ago by Kareimovich

Hi, everybody, I need to get tasks that all tasktags names is in $TagArray but instead if one is in an array it gets I need to get id if all name is in $TagArray

$posts2 = Path::with(['pathtags' => function ($q) use ($TagArray) {
    $q->with(['Tasks'=>function($q) use ($TagArray) { 
         $q->has('tasktags', '=' , 2)->whereHas('tasktags', function ($query) use ($TagArray) {
            $query->whereIn('name' , $TagArray );

in example My Code Dose

name= [PHP,HTml5 ,Css3]

$TagArray = [PHP,HTml ,javascript ]

My Code Will return With the task

but I need to do this in one case

name= [PHP,HTml5 ,Css3]

$TagArray = [PHP,HTml ,javascript,Css3 ]

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

Reply to

Use Markdown with GitHub-flavored code blocks.