codigo actual del servidor, con avances de joan
This commit is contained in:
35
app/Http/Resources/V2/PickupPointResource.php
Normal file
35
app/Http/Resources/V2/PickupPointResource.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\V2;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PickupPointResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
"id" => $this->id,
|
||||
"staff_id" => $this->staff_id,
|
||||
"name" => $this->name,
|
||||
"address" => $this->address,
|
||||
"phone" => $this->phone,
|
||||
"pick_up_status" => $this->pick_up_status,
|
||||
"cash_on_pickup_status" => $this->cash_on_pickup_status,
|
||||
];
|
||||
}
|
||||
|
||||
public function with($request)
|
||||
{
|
||||
return [
|
||||
'success' => true,
|
||||
'status' => 200
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user