@linc Be sure you’re legally covered to do so. For example, in the EU this would be considered “personally identifiable information” and you’d need a genuine, legal basis to record the IP address of a user.
Also, try and stick to Laravel’s conventions for naming. You model should be called App\UserActivity and not “_user_actrivity” [sic]. I’m not sure why you have a preceding slash at all to be honest, and you have a typo in “activity”.
I don't know why you want to track your visitors' IPs but I tried for a custom analytics solution on sites with 1000s of daily hits. Conclusion:You can't track visitors by IP - highly unreliable. Use cookies (with consent).
Why? Mobile ISPs assign IPs round robin out of their pool every time you (re)connect to the network. And that's 60-70% of the traffic.