app/Http/Controllers/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()
    {
         $result = Category::all();
        return view('category.index',compact('result'));
    }
public function index ( ) { $ result = Category :: all ( ) ; return view ( 'category.index' , compact ( 'result' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
//$result = DB::table('categories')->get();