/**
  * Display the password reset view for the given token.
  *
  * @param  string  $token
  * @return Response
  */
 public function getReset($token = null)
 {
     if (is_null($token)) {
         \App::abort(404);
     }
     return \View::make('password.reset')->with('token', $token);
 }
示例#2
0
 public function beforeMethod()
 {
     $this->mUsers = new mUsers();
     $this->auth = new Auth($this->mUsers, $this->config);
     if (Dragon::$method != 'login' && !$this->auth->check()) {
         $this->router->redirect($this->config->get('project_host'));
     }
     parent::beforeMethod();
     $this->view->setLayout('default');
     Assets::add('main', Assets::TYPE_CSS);
     Assets::add('default', Assets::TYPE_JS);
 }
示例#3
0
 public function show($id)
 {
     try {
         $orderLog = $this->orderLogRepo->findById($id);
         $currentUser = $this->auth->user();
         if ($currentUser->id != $orderLog->changer_id && !$currentUser->hasAnyAccess(['orderlogs.view'])) {
             return $this->redirectTo('dash')->with('error_message', Lang::get("messages.permission_denied"));
         }
         $orderLogData = json_decode($this->orderLog->data);
         return $this->view('admin.pages.order_log.show', compact('orderLog', 'orderLogData', 'currentUser'));
     } catch (NotFoundException $e) {
         App::abort(404);
     }
 }
示例#4
0
 /**
  * @param $id
  * @return View
  */
 public function edit($id)
 {
     try {
         $update = true;
         $group = $this->groupRepo->findById($id);
         return $this->view('admin.pages.group.edit', compact('update', 'group'));
     } catch (NotFoundException $e) {
         App::abort(404);
     }
 }
示例#5
0
 /**
  * Some action after any method
  */
 public function afterMethod()
 {
     parent::afterMethod();
 }