Example of Invokable controllers in driesvints/driesvints.com

File app/Http/Controllers/PostController.php (link to Github)
use App\Models\Post;
use Illuminate\Support\Facades\Auth;

final class PostController
{
    public function __invoke(Post $post)
    {
        abort_if(Auth::guest() && $post->isUnpublished(), 404);

        $previous = $post->previous();
        $next = $post->next();

        return view('post', compact('post', 'previous', 'next'));
    }
}
File routes/web.php (link to Github)
Route::get('/blog/{post:slug}', PostController::class)->name('post');

Additional resources on Invokable controllers: