Skeleton is ready
This commit is contained in:
21
app/Feature/Example/Http/Resource/Users.php
Normal file
21
app/Feature/Example/Http/Resource/Users.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Feature\Example\Http\Resource;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
/**
|
||||
* @property \Illuminate\Pagination\LengthAwarePaginator<\App\Models\User\User> $collection
|
||||
*/
|
||||
class Users extends ResourceCollection
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'data' => User::collection($this->collection)
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user