phpvms/app/Http/Resources/Fare.php

28 lines
614 B
PHP
Raw Normal View History

<?php
namespace App\Http\Resources;
use App\Contracts\Resource;
2020-03-03 06:38:48 +08:00
/**
* @mixin \App\Models\Fare
*/
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,
'count' => $this->count ?? 0,
2020-10-28 06:46:15 +08:00
'price' => $this->price,
'type' => $this->type,
'notes' => $this->notes,
'active' => $this->active,
];
}
}