- admin can edit, approve or reject broker registration - admin can edit, delete or impersonate as broker
24 lines
430 B
PHP
24 lines
430 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\MorphOne;
|
|
|
|
class Broker extends Model
|
|
{
|
|
protected $fillable = ['bio', 'location', 'phone'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'verified' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function user(): MorphOne
|
|
{
|
|
return $this->morphOne(User::class, 'role');
|
|
}
|
|
}
|