/** * Store a newly created resource in storage. * * @return Response */ public function store() { $legal = new Legal(); $legal->unguard(); $legal->fill(Input::only(['name', 'body', 'html_body', 'abbreviation', 'active'])); $legal['html_body'] = Markdown::string($legal['body']); if ($legal->validate()) { $legal->save(); } else { return View::make('legals.edit', ['legal' => $legal])->withErrors($legal->validator()); } return Redirect::to(route('settings.index'))->with('message', ['content' => 'Wet met succes aangemaakt!', 'class' => 'success']); }