changes, global search (clients, cleintCases)
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Laravel\Scout\Searchable;
|
||||
|
||||
class PersonPhone extends Model
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\Person/PersonPhoneFactory> */
|
||||
use HasFactory;
|
||||
use Searchable;
|
||||
|
||||
protected $fillable = [
|
||||
'nu',
|
||||
@@ -27,6 +29,13 @@ class PersonPhone extends Model
|
||||
'deleted'
|
||||
];
|
||||
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
'nu' => $this->nu
|
||||
];
|
||||
}
|
||||
|
||||
protected static function booted(){
|
||||
static::creating(function (PersonPhone $personPhone) {
|
||||
if(!isset($personPhone->user_id)){
|
||||
|
||||
Reference in New Issue
Block a user