Skip to content

Commit 6f72436

Browse files
committed
Adding HasDevLogs trait
1 parent 473e040 commit 6f72436

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Concerns/HasDevLogs.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace Binarcode\LaravelDeveloper\Concerns;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
use Illuminate\Database\Eloquent\Relations\MorphMany;
7+
8+
/**
9+
* Trait HasDevLogs
10+
*
11+
* @mixin Model
12+
*
13+
* @package Binarcode\LaravelDeveloper\Concerns
14+
*/
15+
trait HasDevLogs
16+
{
17+
public function devLogs(): MorphMany
18+
{
19+
return $this->morphMany(
20+
ClassResolver::model(),
21+
'target'
22+
);
23+
}
24+
}

0 commit comments

Comments
 (0)