/**
  * Handle the command
  *
  * @param BaseCommand|RegisterUserCommand $command
  *
  * @return mixed
  */
 public function handle(BaseCommand $command)
 {
     $user = new User($command->all());
     $user->save();
     App::make('Altwallets\\Services\\UserMailer')->sendRegistrationEmail($user);
     return $user;
 }
 /**
  * @return \Illuminate\Http\RedirectResponse
  */
 public function getActivate()
 {
     try {
         $token = Input::get('token');
         $email = Input::get('email');
         $id = Crypt::decrypt($token);
         $user = User::where(['id' => $id, 'email' => $email])->firstOrFail();
         $user->active = true;
         $user->save();
         Auth::loginUsingId($user->id);
         return Redirect::route('home');
     } catch (\Exception $e) {
         return Redirect::route('login');
     }
 }
 /**
  * Execute the console command.
  * @return mixed
  */
 public function fire()
 {
     if (app('config')->get('app.key') == 'YourSecretKey!!!') {
         $this->info('Updating your application key.');
         $this->call('key:generate');
     }
     $this->info('Publishing Configuration');
     $this->call('config:publish', ['package' => $this->package]);
     $this->info('Publishing Migrations');
     $this->call('migrate:publish', ['package' => $this->package]);
     $this->info('Publishing Assets');
     $this->call('asset:publish', ['package' => $this->package]);
     $this->info('Migrating Database');
     $this->call('migrate');
     $this->info('Creating Super User');
     $email = $this->ask('Email?');
     $password = $this->secret('Password?');
     Eloquent::unguard();
     $user = User::create(['email' => $email, 'password' => $password, 'super' => true, 'active' => true]);
     $this->info('User [' . $user->id . '] created!');
 }
 /**
  * Handle the command
  *
  * @param $command
  *
  * @return mixed
  */
 public function handle(BaseCommand $command)
 {
     $user = User::create($command->all());
     return $user;
 }
 /**
  * Display a listing of the resource.
  * @return \Response
  */
 public function index()
 {
     $users = User::paginate();
     $this->view('admin.users.index', compact('users'));
 }