Tag::all()]); } /** * Display the specified resource. * * @param string $normalized * @param int|null $id * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View */ public function showVideo($tagName) { // Retrieve the tag based on the provided tag name $tag = Tag::where('name', $tagName)->firstOrFail(); // Get a random video related to the tag $randomVideo = \App\Models\Video::getSingleRandom($tag); // Pass the tag and the random video to your view return view('tag.show')->with(compact('tag', 'randomVideo')); } // Define other CRUD operations for tags as needed. }