owen-it /
laravel-auditing
| 1 | <?php |
||
| 2 | |||
| 3 | namespace OwenIt\Auditing\Resolvers; |
||
| 4 | |||
| 5 | use Illuminate\Support\Facades\Request; |
||
| 6 | use OwenIt\Auditing\Contracts\Auditable; |
||
| 7 | use OwenIt\Auditing\Contracts\Resolver; |
||
| 8 | |||
| 9 | class IpAddressResolver implements Resolver |
||
| 10 | { |
||
| 11 | 15 | public static function resolve(Auditable $auditable): string |
|
| 12 | { |
||
| 13 | 15 | return $auditable->preloadedResolverData['ip_address'] ?? Request::ip(); |
|
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 14 | } |
||
| 15 | } |
||
| 16 |