32 lines
716 B
PHP
32 lines
716 B
PHP
<?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;
|
|
|
|
/**
|
|
* Get the basket that owns the BasketContent
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function basket(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Basket::class);
|
|
}
|
|
|
|
/**
|
|
* Get the coupon owned by the BasketContent
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function coupon(): BelongsTo
|
|
{
|
|
return $this->BelongsTo(Coupon::class);
|
|
}
|
|
}
|