Changeset View
Changeset View
Standalone View
Standalone View
src/app/Entitlement.php
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | class Entitlement extends Model | ||||
/** | /** | ||||
* The SKU concerned. | * The SKU concerned. | ||||
* | * | ||||
* @return Sku | * @return Sku | ||||
*/ | */ | ||||
public function sku() | public function sku() | ||||
{ | { | ||||
return $this->belongsTo('App\Sku'); | return $this->belongsTo('App\Sku')->first(); | ||||
} | } | ||||
/** | /** | ||||
* The owner of this entitlement. | * The owner of this entitlement. | ||||
* | * | ||||
* @return User | * @return User | ||||
*/ | */ | ||||
public function owner() | public function owner() | ||||
{ | { | ||||
return $this->belongsTo('App\User', 'owner_id', 'id'); | return $this->belongsTo('App\User', 'owner_id', 'id')->first(); | ||||
} | } | ||||
/** | /** | ||||
* The wallet this entitlement is being billed to | * The wallet this entitlement is being billed to | ||||
* | * | ||||
* @return Wallet | * @return Wallet | ||||
*/ | */ | ||||
public function wallet() | public function wallet() | ||||
{ | { | ||||
return $this->belongsTo('App\Wallet'); | return $this->belongsTo('App\Wallet')->first(); | ||||
machniak: This is against what Laravel documentation does. I think this is wrong. | |||||
Done Inline ActionsYeah, it is indeed. vanmeeuwen: Yeah, it is indeed. | |||||
} | } | ||||
} | } |
This is against what Laravel documentation does. I think this is wrong.