ldc-legaulois/app/Models/BlockList.php
2024-07-12 16:33:26 +02:00

40 lines
793 B
PHP

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