Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -5,24 +5,20 @@ namespace Pterodactyl\Repositories\Eloquent;
|
|||
use Carbon\Carbon;
|
||||
use Pterodactyl\Models\Backup;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class BackupRepository extends EloquentRepository
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function model()
|
||||
public function model(): string
|
||||
{
|
||||
return Backup::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if too many backups have been generated by the server.
|
||||
*
|
||||
* @return \Pterodactyl\Models\Backup[]|\Illuminate\Support\Collection
|
||||
*/
|
||||
public function getBackupsGeneratedDuringTimespan(int $server, int $seconds = 600)
|
||||
public function getBackupsGeneratedDuringTimespan(int $server, int $seconds = 600): array|Collection
|
||||
{
|
||||
return $this->getBuilder()
|
||||
->withTrashed()
|
||||
|
|
Reference in a new issue