Example #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param CreateHistoryRequest $request
  * @return Response
  */
 public function store(CreateHistoryRequest $request)
 {
     $history = new History();
     $history->fill($request->all());
     $history->user_id = Auth::id();
     $history->save();
     $application = Application::findOrFail($history->application->id);
     $application->status = $history->status;
     $application->save();
     $message = trans('messages.application_updated_successfully');
     Flash::info($message);
     return redirect()->route('admin.applications.show', $history->application);
 }