Exemplo n.º 1
1
 /**
  * {@inheritDoc}
  */
 public function updatePassword(array $data)
 {
     $user = $this->auth->authenticate($data);
     // Setup validation rules.
     $this->rules = ['new_password' => 'required|confirmed', 'new_password_confirmation' => 'required'];
     // Run validation.
     $this->validate($data);
     // Setup new password.
     $updatedData = ['password' => $data['new_password']];
     // Update user.
     Sentinel::update($user, $updatedData);
     return;
 }
 /**
  * The constructor.
  */
 public function __construct()
 {
     $viewNamespace = config('laraflock.dashboard.viewNamespace');
     $this->auth = app()->make('Laraflock\\Dashboard\\Contracts\\AuthRepoInterface');
     $this->permission = app()->make('Laraflock\\Dashboard\\Contracts\\PermissionRepoInterface');
     $this->module = app()->make('Laraflock\\Dashboard\\Contracts\\ModuleRepoInterface');
     $this->role = app()->make('Laraflock\\Dashboard\\Contracts\\RoleRepoInterface');
     $this->user = app()->make('Laraflock\\Dashboard\\Contracts\\UserRepoInterface');
     $user = $this->auth->getActiveUser();
     view()->share(['activeUser' => $user, 'viewNamespace' => $viewNamespace, 'modules' => $this->module]);
 }