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