app/Http/Controllers/AdminCategoryController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        return view('dashboard.categories.index', [
            'categories' => Category::all()
        ]);
    }
public function index ( ) { return view ( 'dashboard.categories.index' , [ 'categories' => Category :: all ( ) ] ) ; }
Display a listing of the resource.
Display a listing of the resource .
// mengembalikan view halaman utama admin category dengan mengambil semua Category pada model category 