1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 17:12:30 +01:00
Pterodactyl-Panel/app/Services/Locations/LocationCreationService.php
Matthew Penner cbcf62086f
Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00

27 lines
573 B
PHP

<?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);
}
}