/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $guides = Guide::get(); return view('admin.guide.section.create', compact('guides')); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $guide = Guide::create(['name' => $request->name, 'summary' => $request->summary, 'description' => $request->description, 'active' => $request->active]); return redirect()->route('guide.section.create', $guide->slug); }