Files
real-estate/app/Models/Tenant.php
2026-01-11 17:11:43 +00:00

17 lines
504 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Tenant extends Model
{
use SoftDeletes;
protected $fillable = ['name', 'email', 'phone', 'emirates_id', 'passport_no', 'nationality', 'address'];
protected static function boot()
{
parent::boot();
static::creating(fn($model) => $model->created_by = auth()->id());
static::updating(fn($model) => $model->updated_by = auth()->id());
}
}