/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $type = Material_type::lists('name', 'id'); return view('backend.pages.element.material.create', compact('type')); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Material_type::destroy($id); return redirect()->route('admin.element.type.index')->withFlashSuccess(trans("element_backend.element_material_deleting")); }