Added plural relationship

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-14 19:33:06 +01:00
parent 4e3379d5ae
commit 0c2bed605f

View file

@ -39,7 +39,12 @@ class AccessoryCheckout extends Model
*/
public function accessory()
{
return $this->hasOne(Accessory::class, 'accessory_id');
return $this->hasOne(Accessory::class, 'id', 'accessory_id');
}
public function accessories()
{
return $this->hasMany(Accessory::class, 'id', 'accessory_id');
}
/**