コード例 #1
0
 public function postCreate()
 {
     $campoextra = new CustomField();
     $campoextra->name = Input::get('name');
     $campoextra->type = Input::get('type');
     $validation = $campoextra->validate();
     if ($validation->fails()) {
         return Redirect::to('backend/camposextra/create')->withInput()->withErrors($validation->getMessageBag());
     }
     $campoextra->save();
     return Redirect::to('backend/camposextra/view/' . $campoextra->id)->with('message', 'El campo extra ha sido creado.');
 }