dealhub/app/Models/Follow.php
kusowl 5cae04884a feature(users can follow a broker)
- add schema and endpoints to make follows relationship with customer
and broker

- show and update states of follow button on ui
2026-02-05 18:19:52 +05:30

25 lines
441 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Follow extends Model
{
protected $fillable = [
'customer_id',
'broker_id',
];
public function customer(): BelongsTo
{
return $this->belongsTo(Customer::class);
}
public function broker(): BelongsTo
{
return $this->belongsTo(Broker::class);
}
}