app/Http/Controllers/Admin/CategoryController.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()
    {
        $categories = PostsCategory::orderBy('title', 'asc')->get();
        return view('admin.categories.index', [
            'categories' => $categories
        ]);
    }
public function index ( ) { $ categories = PostsCategory :: orderBy ( 'title' , 'asc' ) -> get ( ) ; return view ( 'admin.categories.index' , [ 'categories' => $ categories ] ) ; }
Display a listing of the resource.
Display a listing of the resource .