[WIP] Import Plans

This commit is contained in:
2022-07-07 10:17:46 +07:00
parent f18bb85b94
commit 574004d408
146 changed files with 28928 additions and 71 deletions

21
app/Traits/Blameable.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
namespace App\Traits;
trait Blameable {
public static function bootBlameable() {
static::creating(function ($model) {
$model->created_by = auth()->id() ?? NULL;
});
static::updating(function ($model) {
$model->updated_by = auth()->id() ?? NULL;
});
static::deleting((function ($model) {
$model->deleted_by = auth()->id() ?? NULL;
}));
}
}