misc_pterodactyl-panel/app/Http/Requests/Api/Application/Locations/GetLocationRequest.php

22 lines
531 B
PHP
Raw Normal View History

<?php
2018-01-20 01:58:57 +00:00
namespace Pterodactyl\Http\Controllers\Api\Application\Locations;
use Pterodactyl\Models\Location;
2018-01-20 01:58:57 +00:00
use Pterodactyl\Http\Requests\Api\Application\Locations\GetLocationsRequest;
class GetLocationRequest extends GetLocationsRequest
{
/**
* Determine if the requested location exists on the Panel.
*
* @return bool
*/
public function resourceExists(): bool
{
$location = $this->route()->parameter('location');
return $location instanceof Location && $location->exists;
}
}