Esempio n. 1
0
 /**
  * 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'));
 }
Esempio n. 2
0
 /**
  * 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);
 }