- add morph to relationship - add profile markup - modify page-heading.blade.php to accept center and end sections
23 lines
408 B
PHP
23 lines
408 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\MorphOne;
|
|
|
|
class Broker extends Model
|
|
{
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'verified' => 'boolean',
|
|
'active' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function user(): MorphOne
|
|
{
|
|
return $this->morphOne(User::class, 'type');
|
|
}
|
|
}
|