/** * Store a newly created resource in storage. * * @return Response */ public function store() { $custody = new Custody(); $custody->unguard(); $custody->fill(Input::only(['name', 'characteristic', 'location', 'responsible', 'seized', 'date', 'time', 'description', 'html_description', 'details', 'html_details', 'return'])); $custody['time'] = date('Y-m-d H:m:s'); $custody['html_description'] = Markdown::string($custody['description']); $custody['html_details'] = Markdown::string($custody['details']); if ($custody->validate()) { $custody->save(); } else { return View::make('custody.edit', ['custody' => $custody])->withErrors($custody->validator()); } return Redirect::to(route('evidences.index'))->with('message', ['content' => 'Chain of Custody met succes aangemaakt!', 'class' => 'success']); }