前端页面是
POST 过来之后我在C层中是否可以写成如下:
$user = new User;
$user->attributes = Input::get('users');
if ($user->save()) {
return Redirect::to('admin');
} else {
return Redirect::back()->withInput()->withErrors('保存失败!');
}