-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read Audit Implementation from Auditable (#874)
Co-authored-by: gisostallenberg <[email protected]>
- Loading branch information
1 parent
27e1b31
commit a08c673
Showing
5 changed files
with
53 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace OwenIt\Auditing\Tests\Models; | ||
|
||
use Illuminate\Database\Eloquent\Relations\MorphMany; | ||
|
||
class ArticleCustomAuditMorph extends Article | ||
{ | ||
protected $table = 'articles'; | ||
|
||
/** | ||
* @return MorphMany<CustomAudit> | ||
*/ | ||
public function audits(): MorphMany | ||
{ | ||
return $this->morphMany(CustomAudit::class, 'auditable'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace OwenIt\Auditing\Tests\Models; | ||
|
||
use OwenIt\Auditing\Models\Audit; | ||
|
||
class CustomAudit extends Audit | ||
{ | ||
|
||
} |