where('status',1); } public static function boot() { parent::boot(); static::created(function ($model) { $model->created_by = Auth::id() ?? null; }); static::updating(function ($model) { $model->updated_by = Auth::id() ?? null; }); } }