Ejemplo n.º 1
0
 public function update(BusinessHourRequest $request, BusinessHour $business_hour)
 {
     if (!Helper::getMode()) {
         return redirect()->back()->withErrors(config('constants.DISABLE_MESSAGE'));
     }
     if ($request->input('start') > $request->input('end')) {
         return redirect()->back()->withErrors('End time cannot be greater than start time.');
     }
     $business_hour->fill($request->all())->save();
     return redirect('/configuration#business_hour')->withSuccess(config('constants.UPDATED'));
 }