mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 09:01:42 -04:00
25 lines
627 B
PHP
25 lines
627 B
PHP
<?php
|
|
namespace Modules\MenuPlus\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class Meta extends Model
|
|
{
|
|
protected $table = "menu_element_metas";
|
|
protected $guarded = ["id"];
|
|
|
|
public static function boot()
|
|
{
|
|
parent::boot();
|
|
static::created(function ($attribute) {
|
|
$attribute->created_at = Auth::user()->id ?? null;
|
|
});
|
|
|
|
static::updating(function ($attribute) {
|
|
$attribute->updated_at = Auth::user()->id ?? null;
|
|
});
|
|
}
|
|
}
|