*/ protected $fillable = ['ip']; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'ip' => Ip::class ]; // * EVENTS /** * Perform any actions required after the model boots. * * @return void */ protected static function booted() { static::created(fn () => self::removeCached()); static::updated(fn () => self::removeCached()); static::deleted(fn () => self::removeCached()); } // * RELATIONS /** * Activities logs One-to-many relationship. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function activityLogs(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ActivityLog::class); } }