mardi 16 juin 2020

Call to a member function whereBetween() on array

Getting Error while filter by date... Call to a member function whereBetween() on array


$tag = Tag::with('tracks', 'elements')
                    ->whereIn('category_id', [$genresCat->id, $moodCat->id, $productionCat->id, $vocalCat->id])
                    ->whereIn('id', $id)
                    ->get()
                    ->toArray();

            }
            if($year){
                    $dateS = date('Y-m-d', strtotime('-5 year'));

                    $dateE = date('Y-m-d');
                    $tag->whereBetween('created_at', [$dateS, $dateE]);
                }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire