/** * Display a listing of the resource. * * @return Response */ public function index() { //List all Fields $fields = Field::orderBy('name', 'ASC')->get(); //Load the view and pass the Fields return view('config.field.index', compact('fields')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $fields = Field::orderBy('field_name')->get(); //Get the Configurable $configurable = Configurable::find($id); //Open the Edit View and pass to it the $configurable return view('config.configurable.edit', compact('configurable', 'fields')); }