'json', 'new_values' => 'json', ]; protected $table = 'admin_operation_log'; protected $hidden = [ 'updated_at' ]; /** * 获取进行此操作的用户 */ public function user() { return $this->belongsTo(User::class); } /** * 获取关联的模型 */ public function model() { return $this->morphTo(); } /** * @return string[] */ #[ArrayShape(['login' => "string", 'logout' => "string", 'create' => "string", 'update' => "string", 'delete' => "string" ])] public static function getActionArr(): array { return [ 'login' => __('admin.login'), 'logout' => __('admin.logout'), 'create' => __('admin.new'), 'update' => __('admin.edit'), 'delete' => __('admin.delete') ]; } }