/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(Request $request, $orgId) { $restaurant = new \App\Restaurant(); $restaurant->fill($request->input('Restaurant', [])); if ($restaurant->isValid()) { $restaurant->save(); return redirect()->route('restaurant.index', ['orgId' => $orgId]); } else { return redirect()->route('restaurant.create')->withErrors($restaurant->getErrors())->withInput(); } }