public function post_systememailtemplatesave() { //Get our data $id = Input::get('id'); $subject = Input::get('subject'); $content = Input::get('content'); //Verify that this in fact a valid system template ID $template = SystemEmailTemplate::findOrFail($id); //I'm too lazy to use proper validation for this if (empty($subject)) { return Redirect::to('console/emailtemplates/edit/system/' . $id)->with('message', 'Please enter a subject.'); } if (empty($content)) { return Redirect::to('console/emailtemplates/edit/system/' . $id)->with('message', 'Please enter an email body.'); } //Alright all good let's push these edits $template->subject = $subject; $template->content = $content; $template->save(); //Redirect back return Redirect::route('consoleemailtemplates')->with('message', 'System template "' . $id . '" updated successfully.'); }