/** * Handle the command * * @param $command * @return mixed */ public function handle($command) { $checkin = $this->checkinRepository->create(['sight_id' => $command->sight_id, 'country' => $command->country, 'mac_address' => $command->mac_address]); $checkin->raise(new UserHasCheckedIn($checkin)); $this->dispatchEventsFor($checkin); }