<?php
namespace App\Http\Controllers;
//==========ここから追加==========
use App\Tag;
//==========ここまで追加==========
use Illuminate\Http\Request;
class TagController extends Controller
{
//==========ここから追加==========
public function show(string $name)
{
$tag = Tag::where('name', $name)->first();
return view('tags.show', ['tag' => $tag]);
}
//==========ここまで追加==========
}