<?php
 namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Categories;

class AuthorController extends Controller
{
    public function show()
    {
        // Fetch all categories
        $catM = Categories::all();

        // Pass categories to the view
        return view('author', [
            'catM' => $catM
        ]);
    }
}

