app/Http/Controllers/CategoriesController.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()
    {
        $categories=Category::where('category_id','=','0')
                            ->orderBy('name','ASC')
                            ->pluck('name','id')->toArray();
        $categories[0]='Selecione una Categoria';
        return view("admin.categories.create")
                ->with('categories',$categories);
    }
public function create ( ) { $ categories = Category :: where ( 'category_id' , '=' , '0' ) -> orderBy ( 'name' , 'ASC' ) -> pluck ( 'name' , 'id' ) -> toArray ( ) ; $ categories [ 0 ] = 'Selecione una Categoria' ; return view ( " admin.categories.create " ) -> with ( 'categories' , $ categories ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .