codigo actual del servidor, con avances de joan
This commit is contained in:
31
app/Http/Resources/V2/DeliveryBoyCollection.php
Normal file
31
app/Http/Resources/V2/DeliveryBoyCollection.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\V2;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
class DeliveryBoyCollection extends ResourceCollection
|
||||
{
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'data' => $this->collection->map(function ($data) {
|
||||
return [
|
||||
'id' => $data->id,
|
||||
'user_id' => $data->user_id,
|
||||
'total_collection' => $data->total_collection,
|
||||
'total_earning' => $data->total_earning,
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
public function with($request)
|
||||
{
|
||||
return [
|
||||
'success' => true,
|
||||
'status' => 200
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user