public function findAllWithRelationBySlug($slug) { return $this->model->with('categories')->with(['videos' => function ($query) { $query->where('published_at', '<=', Carbon::now()); }])->whereSlug($slug)->firstOrFail(); }