lundi 30 mars 2020

Laravel Spatie Activity Log Ip Address Customize

I am using Laravel Spatie Activity Log package in my laravel application. I could customize in each module.

 public function tapActivity(Activity $activity, string $eventName)
 {
    $activity->description = "Category is {$eventName}. ";
    $activity->os = getOS();// custom hlper
 }

This problem was when I was going to save ip.

$activity->ip = $request->ip();

I think above field should be added. But where can we get $request ?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2w3Pceo
via IFTTT

1 commentaire: