/**
  * Handle the event.
  *
  * @param  UserWasCreated $event
  * @return void
  */
 public function handle(UserWasCreated $event)
 {
     /**
      * Give the user an empty bag
      */
     $this->repository->attach([], $event->user->id);
 }
 /**
  * Execute the command.
  *
  * @param BagRepositoryInterface $repository
  * @param Dispatcher $event
  */
 public function handle(BagRepositoryInterface $repository, Dispatcher $event)
 {
     /**
      * Increment User Coins
      */
     $repository->addCoins($this->user->bag->id, $this->amount);
     /**
      * Announce CoinWasPurchased
      */
     $event->fire(new CoinWasPurchased($this->user, $this->amount));
 }
 /**
  * Execute the command.
  *
  * @param BagRepositoryInterface $repository
  * @param Dispatcher $event
  */
 public function handle(BagRepositoryInterface $repository, Dispatcher $event)
 {
     /**
      * Refund User
      */
     $repository->addCoins($this->user->bag->id, $this->amount);
     /**
      * Announce UserWasRefunded
      */
     $event->fire(new UserWasRefunded($this->user, $this->amount));
 }
 /**
  * Execute the command.
  *
  * @param BagRepositoryInterface $repository
  * @param Dispatcher $event
  */
 public function handle(BagRepositoryInterface $repository, Dispatcher $event)
 {
     /**
      * Deduct User Coins
      */
     $repository->deductCoin($this->user->bag->id, $this->amount);
     /**
      * Announce UserCoinsWasDeducted
      */
     $event->fire(new UserCoinsWasDeducted($this->user, $this->amount));
 }
 /**
  * Execute the command.
  *
  * @param BagRepositoryInterface $repository
  */
 public function handle(BagRepositoryInterface $repository)
 {
     $repository->deductCoin($this->user_id, $this->amount);
 }