PHPackages                             shyevsa/yii2-ipbehavior - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shyevsa/yii2-ipbehavior

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

shyevsa/yii2-ipbehavior
=======================

Yii2 Behavior for updating IP address

v0.1.0(1y ago)015BSD-3-ClausePHPPHP &gt;=7.4.0CI failing

Since Nov 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/shyevsa/shyevsa-yii2-ipbehavior)[ Packagist](https://packagist.org/packages/shyevsa/yii2-ipbehavior)[ Docs](https://github.com/shyevsa/yii2-ipbehavior/)[ RSS](/packages/shyevsa-yii2-ipbehavior/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Yii2 IP Behavior
================

[](#yii2-ip-behavior)

Yii2 Behavior for updating IP address on update or insert with ip address in `blob` format or `string` format.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/).

```
composer require shyevsa/yii2-ipbehavior "*"
```

or add

```
"shyevsa/yii2-ipbehavior": "*"
```

to the `require` section of your `composer.json`.

Usage
-----

[](#usage)

### Default Blob Format

[](#default-blob-format)

By Default the behavior will use `blob` format ip address for `created_from` and `updated_from` attributes. this required the database column to be set as `binary` or `varbinary` type.

```
