|
| 1 | +<?php |
| 2 | + |
| 3 | +return [ |
| 4 | + |
| 5 | + 'enabled' => env('AUDITING_ENABLED', true), |
| 6 | + |
| 7 | + /* |
| 8 | + |-------------------------------------------------------------------------- |
| 9 | + | Audit Implementation |
| 10 | + |-------------------------------------------------------------------------- |
| 11 | + | |
| 12 | + | Define which Audit model implementation should be used. |
| 13 | + | |
| 14 | + */ |
| 15 | + |
| 16 | + 'implementation' => OwenIt\Auditing\Models\Audit::class, |
| 17 | + |
| 18 | + /* |
| 19 | + |-------------------------------------------------------------------------- |
| 20 | + | User Morph prefix & Guards |
| 21 | + |-------------------------------------------------------------------------- |
| 22 | + | |
| 23 | + | Define the morph prefix and authentication guards for the User resolver. |
| 24 | + | |
| 25 | + */ |
| 26 | + |
| 27 | + 'user' => [ |
| 28 | + 'morph_prefix' => 'user', |
| 29 | + 'guards' => [ |
| 30 | + 'web', |
| 31 | + 'api', |
| 32 | + ], |
| 33 | + ], |
| 34 | + |
| 35 | + /* |
| 36 | + |-------------------------------------------------------------------------- |
| 37 | + | Audit Resolvers |
| 38 | + |-------------------------------------------------------------------------- |
| 39 | + | |
| 40 | + | Define the User, IP Address, User Agent and URL resolver implementations. |
| 41 | + | |
| 42 | + */ |
| 43 | + 'resolver' => [ |
| 44 | + 'user' => OwenIt\Auditing\Resolvers\UserResolver::class, |
| 45 | + 'ip_address' => OwenIt\Auditing\Resolvers\IpAddressResolver::class, |
| 46 | + 'user_agent' => OwenIt\Auditing\Resolvers\UserAgentResolver::class, |
| 47 | + 'url' => OwenIt\Auditing\Resolvers\UrlResolver::class, |
| 48 | + ], |
| 49 | + |
| 50 | + /* |
| 51 | + |-------------------------------------------------------------------------- |
| 52 | + | Audit Events |
| 53 | + |-------------------------------------------------------------------------- |
| 54 | + | |
| 55 | + | The Eloquent events that trigger an Audit. |
| 56 | + | |
| 57 | + */ |
| 58 | + |
| 59 | + 'events' => [ |
| 60 | + 'created', |
| 61 | + 'updated', |
| 62 | + 'deleted', |
| 63 | + 'restored', |
| 64 | + ], |
| 65 | + |
| 66 | + /* |
| 67 | + |-------------------------------------------------------------------------- |
| 68 | + | Strict Mode |
| 69 | + |-------------------------------------------------------------------------- |
| 70 | + | |
| 71 | + | Enable the strict mode when auditing? |
| 72 | + | |
| 73 | + */ |
| 74 | + |
| 75 | + 'strict' => false, |
| 76 | + |
| 77 | + /* |
| 78 | + |-------------------------------------------------------------------------- |
| 79 | + | Audit Timestamps |
| 80 | + |-------------------------------------------------------------------------- |
| 81 | + | |
| 82 | + | Should the created_at, updated_at and deleted_at timestamps be audited? |
| 83 | + | |
| 84 | + */ |
| 85 | + |
| 86 | + 'timestamps' => false, |
| 87 | + |
| 88 | + /* |
| 89 | + |-------------------------------------------------------------------------- |
| 90 | + | Audit Threshold |
| 91 | + |-------------------------------------------------------------------------- |
| 92 | + | |
| 93 | + | Specify a threshold for the amount of Audit records a model can have. |
| 94 | + | Zero means no limit. |
| 95 | + | |
| 96 | + */ |
| 97 | + |
| 98 | + 'threshold' => 0, |
| 99 | + |
| 100 | + /* |
| 101 | + |-------------------------------------------------------------------------- |
| 102 | + | Audit Driver |
| 103 | + |-------------------------------------------------------------------------- |
| 104 | + | |
| 105 | + | The default audit driver used to keep track of changes. |
| 106 | + | |
| 107 | + */ |
| 108 | + |
| 109 | + 'driver' => 'database', |
| 110 | + |
| 111 | + /* |
| 112 | + |-------------------------------------------------------------------------- |
| 113 | + | Audit Driver Configurations |
| 114 | + |-------------------------------------------------------------------------- |
| 115 | + | |
| 116 | + | Available audit drivers and respective configurations. |
| 117 | + | |
| 118 | + */ |
| 119 | + |
| 120 | + 'drivers' => [ |
| 121 | + 'database' => [ |
| 122 | + 'table' => 'audits', |
| 123 | + 'connection' => null, |
| 124 | + ], |
| 125 | + ], |
| 126 | + |
| 127 | + /* |
| 128 | + |-------------------------------------------------------------------------- |
| 129 | + | Audit Console |
| 130 | + |-------------------------------------------------------------------------- |
| 131 | + | |
| 132 | + | Whether console events should be audited (eg. php artisan db:seed). |
| 133 | + | |
| 134 | + */ |
| 135 | + |
| 136 | + 'console' => true, |
| 137 | +]; |
0 commit comments