2020-03-03 04:36:01 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
|
2020-03-23 21:31:35 +08:00
|
|
|
use App\Contracts\Resource;
|
2020-03-03 04:36:01 +08:00
|
|
|
|
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-10-28 06:46:15 +08:00
|
|
|
'id' => $this->id,
|
|
|
|
'code' => $this->code,
|
|
|
|
'name' => $this->name,
|
|
|
|
'capacity' => $this->capacity,
|
|
|
|
'cost' => $this->cost,
|
2021-03-03 01:29:04 +08:00
|
|
|
'count' => $this->count ?? 0,
|
2020-10-28 06:46:15 +08:00
|
|
|
'price' => $this->price,
|
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,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|