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; 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,

View File

@@ -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
{ {