misc_pterodactyl-panel/app/Services/Locations/LocationCreationService.php

27 lines
573 B
PHP
Raw Permalink Normal View History

<?php
namespace Pterodactyl\Services\Locations;
use Pterodactyl\Models\Location;
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
class LocationCreationService
{
/**
* LocationCreationService constructor.
*/
public function __construct(protected LocationRepositoryInterface $repository)
{
}
/**
* Create a new location.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
*/
public function handle(array $data): Location
{
return $this->repository->create($data);
}
}