ldc-legaulois/app/Models/BlockList.php

41 lines
793 B
PHP
Raw Normal View History

2024-07-11 15:46:43 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
2024-07-12 16:33:26 +02:00
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2024-07-11 15:46:43 +02:00
class BlockList extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array<integer, string>
*/
protected $fillable = [
'customer_id', 'blocked_id'
];
// * RELATIONSHIPS
2024-07-12 16:33:26 +02:00
/**
* Summary of customer
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function customer(): BelongsTo
2024-07-11 15:46:43 +02:00
{
return $this->belongsTo(Customer::class);
}
2024-07-12 16:33:26 +02:00
/**
*
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function blocked(): BelongsTo
2024-07-11 15:46:43 +02:00
{
return $this->belongsTo(Customer::class, 'blocked_id');
}
}