public function edit($id) { if (!$id) { return Redirect::action('system/user')->with('error', '用户不存在'); } $user = \App\User::find($id); if (empty($user)) { return Redirect::action('system/user')->with('error', '用户不存在'); } $view = View::make('admin/system/user-edit'); $view->system_manager = true; $view->groups = \App\Group::findAll(); $view->token = Security::getToken($id); $view->user = $user; return $view; }