Add ID column to fare #608
This commit is contained in:
@@ -4,11 +4,15 @@ namespace App\Http\Resources;
|
|||||||
|
|
||||||
use Illuminate\Http\Resources\Json\Resource;
|
use Illuminate\Http\Resources\Json\Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @mixin \App\Models\Fare
|
||||||
|
*/
|
||||||
class Fare extends Resource
|
class Fare extends Resource
|
||||||
{
|
{
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'id' => $this->id,
|
||||||
'code' => $this->code,
|
'code' => $this->code,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'price' => $this->price,
|
'price' => $this->price,
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ namespace App\Models;
|
|||||||
use App\Contracts\Model;
|
use App\Contracts\Model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Fare
|
* @property string name
|
||||||
*
|
|
||||||
* @property int capacity
|
|
||||||
* @property float cost
|
* @property float cost
|
||||||
* @property float price
|
* @property float price
|
||||||
* @property mixed code
|
* @property int code
|
||||||
* @property mixed count Only when merged with pivot
|
* @property int capacity
|
||||||
|
* @property int count Only when merged with pivot
|
||||||
|
* @property string notes
|
||||||
|
* @property bool active
|
||||||
*/
|
*/
|
||||||
class Fare extends Model
|
class Fare extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user