first commit
This commit is contained in:
17
app/Models/Owner.php
Normal file
17
app/Models/Owner.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Owner 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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user