This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Api\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
class BaseCollection extends ResourceCollection
{
protected function page(): array
{
return [
'current' => $this->currentPage(),
'total_page' => $this->lastPage(),
'per_page' => $this->perPage(),
'has_more' => $this->hasMorePages(),
'total' => $this->total(),
];
}
}