Пример #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(TimeCreateRequest $request)
 {
     $request->merge(['time_at' => Carbon::createFromFormat('m/d/Y', $request->input('time_at'))]);
     $time = $this->time->create($request->all());
     return redirect($request->input('_redirect'));
 }
Пример #2
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(TimeCreateRequest $request)
 {
     $request->merge(['time_at' => Carbon::createFromFormat('m/d/Y', $request->input('time_at'), auth()->user()->timezone)->startOfDay()->tz(config('app.timezone'))]);
     $time = $this->time->create($request->all());
     return redirect($request->input('_redirect'));
 }