app/Http/Controllers/CategoriesController.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 = Category::all();	
        $data = array(	
            'categories'=>$categories,	
        );	
        return view('pages.categories.index')->with($data);
    }
public function index ( ) { $ categories = Category :: all ( ) ; $ data = array ( 'categories' => $ categories , ) ; return view ( 'pages.categories.index' ) -> with ( $ data ) ; }
Display a listing of the resource.
Display a listing of the resource .