-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support ignoring fields at the model level (#7)
* support ignoring fields at the model level * add example for more custom exclude logic
- Loading branch information
Tom Schlick
authored
Aug 23, 2019
1 parent
466d391
commit f9f7d3d
Showing
6 changed files
with
81 additions
and
0 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
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,20 @@ | ||
<?php | ||
|
||
namespace OrisIntel\AuditLog\Tests\Fakes\Models; | ||
|
||
use Illuminate\Database\Eloquent\Model; | ||
use OrisIntel\AuditLog\Traits\AuditLoggable; | ||
|
||
class IgnoredFieldsPost extends Model | ||
{ | ||
use AuditLoggable; | ||
|
||
protected $guarded = []; | ||
|
||
protected $table = 'posts'; | ||
|
||
public function getAuditLogIgnoredFields() : array | ||
{ | ||
return ['posted_at']; | ||
} | ||
} |
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,12 @@ | ||
<?php | ||
|
||
namespace OrisIntel\AuditLog\Tests\Fakes\Models; | ||
|
||
use OrisIntel\AuditLog\Models\BaseModel; | ||
|
||
class IgnoredFieldsPostAuditLog extends BaseModel | ||
{ | ||
public $timestamps = false; | ||
|
||
public $table = 'posts_auditlog'; | ||
} |
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