2020-03-03 04:36:01 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
|
|
|
use Illuminate\Http\Resources\Json\Resource;
|
|
|
|
|
2020-03-03 06:38:48 +08:00
|
|
|
/**
|
|
|
|
* @mixin \App\Models\Fare
|
|
|
|
*/
|
2020-03-03 04:36:01 +08:00
|
|
|
class Fare extends Resource
|
|
|
|
{
|
|
|
|
public function toArray($request)
|
|
|
|
{
|
|
|
|
return [
|
2020-03-03 06:38:48 +08:00
|
|
|
'id' => $this->id,
|
2020-03-03 04:36:01 +08:00
|
|
|
'code' => $this->code,
|
|
|
|
'name' => $this->name,
|
|
|
|
'price' => $this->price,
|
2020-03-03 05:08:58 +08:00
|
|
|
'cost' => $this->cost,
|
2020-03-03 04:36:01 +08:00
|
|
|
'capacity' => $this->capacity,
|
2020-03-07 04:10:03 +08:00
|
|
|
'type' => $this->type,
|
2020-03-03 04:36:01 +08:00
|
|
|
'notes' => $this->notes,
|
|
|
|
'active' => $this->active,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|