ldc-mesbr-app/app/Models/BasketsContent.php

33 lines
716 B
PHP
Raw Normal View History

2023-09-13 16:48:17 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class BasketsContent extends Model
{
use HasFactory;
2023-11-24 15:35:08 +01:00
/**
* Get the basket that owns the BasketContent
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function basket(): BelongsTo
2023-09-13 16:48:17 +02:00
{
return $this->belongsTo(Basket::class);
}
2023-11-24 15:35:08 +01:00
/**
* Get the coupon owned by the BasketContent
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function coupon(): BelongsTo
2023-09-13 16:48:17 +02:00
{
return $this->BelongsTo(Coupon::class);
}
}