mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-04 00:16:08 -04:00
24 lines
491 B
PHP
24 lines
491 B
PHP
<?php
|
|
|
|
namespace Modules\Attendance\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class ToDo extends Model
|
|
{
|
|
protected $fillable = ['status','title'];
|
|
|
|
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;
|
|
});
|
|
}
|
|
}
|