Add ID column to fare #608

This commit is contained in:
Nabeel Shahzad 2020-03-02 17:38:48 -05:00
parent f1902a5faa
commit dcf9f48364
2 changed files with 10 additions and 5 deletions

View File

@ -4,11 +4,15 @@ namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\Resource;
/**
* @mixin \App\Models\Fare
*/
class Fare extends Resource
{
public function toArray($request)
{
return [
'id' => $this->id,
'code' => $this->code,
'name' => $this->name,
'price' => $this->price,

View File

@ -5,13 +5,14 @@ namespace App\Models;
use App\Contracts\Model;
/**
* Class Fare
*
* @property int capacity
* @property string name
* @property float cost
* @property float price
* @property mixed code
* @property mixed count Only when merged with pivot
* @property int code
* @property int capacity
* @property int count Only when merged with pivot
* @property string notes
* @property bool active
*/
class Fare extends Model
{