love_php/app/Traits/Haslog.php

20 lines
352 B
PHP
Raw Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Traits;
use App\Models\Log;
use Illuminate\Database\Eloquent\Relations\MorphMany;
trait Haslog
{
public function logs(): MorphMany
{
return $this->morphMany(Log::class, 'log');
}
// public function primaryId(): string
// {
// return (string)$this->getAttribute($this->primaryKey);
// }
}