app/Http/Controllers/CategoryController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create()
    {
        $cat = Category::where('active',1)->pluck('name','id');
        return view('admin.categories.create',compact('cat'));
    }
public function create ( ) { $ cat = Category :: where ( 'active' , 1 ) -> pluck ( 'name' , 'id' ) ; return view ( 'admin.categories.create' , compact ( 'cat' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .