@@ -3,7 +3,6 @@
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Contracts\Resource;
|
||||
use App\Services\FareService;
|
||||
|
||||
/**
|
||||
* @mixin \App\Models\Fare
|
||||
@@ -12,17 +11,13 @@ class Fare extends Resource
|
||||
{
|
||||
public function toArray($request)
|
||||
{
|
||||
/** @var FareService $fareSvc */
|
||||
$fareSvc = app(FareService::class);
|
||||
$fare = $fareSvc->getFares($this);
|
||||
|
||||
return [
|
||||
'id' => $fare->id,
|
||||
'code' => $fare->code,
|
||||
'name' => $fare->name,
|
||||
'capacity' => $fare->capacity,
|
||||
'cost' => $fare->cost,
|
||||
'price' => $fare->price,
|
||||
'id' => $this->id,
|
||||
'code' => $this->code,
|
||||
'name' => $this->name,
|
||||
'capacity' => $this->capacity,
|
||||
'cost' => $this->cost,
|
||||
'price' => $this->price,
|
||||
'type' => $this->type,
|
||||
'notes' => $this->notes,
|
||||
'active' => $this->active,
|
||||
|
||||
Reference in New Issue
Block a user