/** * 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); }