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()
    {
        $cat = Category::where('active',1)->get();
        return view('admin.categories.index',compact('cat'));
    }
public function index ( ) { $ cat = Category :: where ( 'active' , 1 ) -> get ( ) ; return view ( 'admin.categories.index' , compact ( 'cat' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .