/** * Handle the command. * * @param $command */ public function handle($command) { $role = Role::create(['default' => $command->default]); $this->roleRepository->save($role); $this->translationService->sync($role, $command->translated); $this->permissionsService->sync($role, $command->permissions); $this->eventDispatcher->dispatch($role->releaseEvents()); }