20 lines
352 B
PHP
20 lines
352 B
PHP
<?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);
|
|
// }
|
|
|
|
|
|
} |