fisrt
This commit is contained in:
20
app/Api/Resources/User/UserDataCollection.php
Normal file
20
app/Api/Resources/User/UserDataCollection.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Api\Resources\User;
|
||||
|
||||
use App\Api\Resources\BaseCollection;
|
||||
|
||||
class UserDataCollection extends BaseCollection
|
||||
{
|
||||
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'data' => $this->collection->map(function ($info) {
|
||||
return new UserDataResource($info);
|
||||
}),
|
||||
'page' => $this->page(),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user