PHPackages                             axsor/laravel-phpipam - 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. axsor/laravel-phpipam

ActiveLibrary

axsor/laravel-phpipam
=====================

PhpIPAM wrapper for laravel

1.1.1(4y ago)21.3k2GPL-3.0-or-laterPHPPHP &gt;=7.3

Since May 23Pushed 4y ago2 watchersCompare

[ Source](https://github.com/sorribes22/laravel-phpipam)[ Packagist](https://packagist.org/packages/axsor/laravel-phpipam)[ RSS](/packages/axsor-laravel-phpipam/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (21)Used By (0)

Laravel - PhpIPAM
=================

[](#laravel---phpipam)

[![Latest Stable Version](https://camo.githubusercontent.com/7a5d5e8e0058b10cea0e4c45b3395aa0dc8a6d5809305aee6ca406bfce576f34/68747470733a2f2f706f7365722e707567782e6f72672f6178736f722f6c61726176656c2d7068706970616d2f762f737461626c652e706e67)](https://packagist.org/packages/axsor/laravel-phpipam)[![Build Status](https://camo.githubusercontent.com/771af2eaa25ca90fe26c45a77fa76d8c70fbbe0feb6e09de1d802f347610687a/68747470733a2f2f7472617669732d63692e6f72672f736f72726962657332322f6c61726176656c2d7068706970616d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sorribes22/laravel-phpipam)[![StyleCI](https://camo.githubusercontent.com/500240defe3e794776f39ef0fe63faf4e34ae8e786a3ecbb0023b3693424494a/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3230303636313738302f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/200661780)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0cec79534c2ec45f52736abc996bfe4cbc649bff7c5330c8c864e0f1721c7930/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f72726962657332322f6c61726176656c2d7068706970616d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sorribes22/laravel-phpipam/?branch=master)

> [PhpIPAM](https://phpipam.net/) wrapper for laravel

Attention: Lastest stable version is from [this repository](https://github.com/E-Ports/laravel-phpipam). Actual developement is not finished and posted to [packagist](https://packagist.org/packages/axsor/laravel-phpipam) yet.

Index
-----

[](#index)

- [Installation](#installation)
- [Configuration](#configuration)
- [How to use](#how-to-use)
- [Available methods](#available-methods)
- [License](#license)

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

[](#installation)

Install it via composer:

`composer require axsor/laravel-phpipam`

If you are using Laravel 5.4 or lower you must add PhpIPAMServiceProvider to your `config/app.php`:

```
'providers' => [
    Axsor\PhpIPAM\PhpIPAMServiceProvider::class,
],
```

Higher versions will [auto-discover](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518) it.

Configuration
-------------

[](#configuration)

Edit your `.env` file and add your **PhpIPAM credentials**:

```
PHPIPAM_URL=https://your-phpipam-server/api
PHPIPAM_USER=username
PHPIPAM_PASSWORD=password
PHPIPAM_APP="phpipam application"
PHPIPAM_TOKEN="phpipam application token"
PHPIPAM_VERIFY_CERT=false    # Optional (Default: true)
```

And run `php artisan config:cache` to reload config cache.

If you want to use **different PhpIPAM connections**, you have to publish the config file using the next command and configure as connections as you want:

```
'default' => [
    'url' => env('PHPIPAM_URL'),
    'user' => env('PHPIPAM_USER'),
    'pass' => env('PHPIPAM_PASSWORD'),
    'app' => env('PHPIPAM_APP'),
    'token' => env('PHPIPAM_TOKEN'),
    'verify_cert' => env('PHPIPAM_VERIFY_CERT', true),
],

'second_connection' => [
    'url' => env('PHPIPAM_2_URL'),
    'user' => env('PHPIPAM_2_USER'),
    'pass' => env('PHPIPAM_2_PASSWORD'),
    'app' => env('PHPIPAM_2_APP'),
    'token' => env('PHPIPAM_2_TOKEN'),
    'verify_cert' => env('PHPIPAM_2_VERIFY_CERT', true),
],

```

`php artisan vendor:publish --provider="Axsor\\PhpIPAM\\PhpIPAMServiceProvider" --tag="config" `

If in some moment you want to use other different configuration you can set it:

```
$config = [
    'url' => 'https://phpipam.net/api',
    'user' => 'axsor',
    'pass' => 'secure',
    'app' => 'api-client',
    'token' => 'my_awesome_token',
    'verify_cert' => false
];

PhpIPAM::use($config)->address(22); // Sets custom configuration before execute method

PhpIPAM::ping(22); // Keeps custom configuration when execute method

PhpIPAM::useDefaultConfig(); // Discard custom configuration and uses default configuration
```

How to use
----------

[](#how-to-use)

Object parameters nomenclature and data type must agree on [PhpPIAM API Documentation](https://phpipam.net/api/api_documentation/).

Most of methods returns Models (Address, Subnet, ...), [Collections](https://laravel.com/docs/collections) of models or action results as boolean ('created', 'updated', ...).

When you call PhpIPAM model you can pass the **ID** or the **model** that contains the id. ex. `PhpIPAM::subnet($subnetId)` will return same than `PhpIPAM::subnet($subnetObject)`.

```
use Axsor\PhpIPAM\Facades\PhpIPAM;

class MyController extends Controller
{
    public function ping(Request $request, $addressId)
    {
        return PhpIPAM::ping($addressId); // Returns true if address is online
    }

    public function address(Request $request, $addressId)
    {
        $user = Auth::user();

        $config = config('phpipam');
        $config['user'] = $user->phpipam_user;
        $config['pass'] = $user->phpipam_pass;

        return PhpIPAM::use($config)->address($addressId); // Returns address using custom config
    }

    public function addressUpdate(Request $request, $addressId)
    {
        $address = PhpIPAM::address($addressId);

        $address->hostname = 'New Hostname';

        $address->update();

        // Or
        PhpIPAM::addressUpdate($addressId);

        // Or
        $address = PhpIPAM::address($addressId);
        // Do some actions with address
        $newData = [...];
        PhpIPAM::addressUpdate($address, $newData);
    }
}
```

Connections
-----------

[](#connections)

You can set multiple instances of PhpIPAM.

```
PhpIPAM::tags(); // Return tags from 'default' phpipam instance

PhpIPAM::connect('second_instance')->tags(); // Return tags from 'second_instance' phpipam instance
PhpIPAM::tags(); // Return tags from 'second_instance' phpipam instance

PhpIPAM::resetConnection()->tags(); // Return tags from 'default' phpipam instance

```

Available methods
-----------------

[](#available-methods)

All api calls are **wrapped** by the controllers into Models, [Collections](https://laravel.com/docs/collections) or simple data types.

(Pending:) If you want to **get the response content without wrapping** you can use the same command adding "Raw" as suffix. ex. `PhpIPAM::addressRaw($address)`. That will return you an associative array with the response content.

The model methods will call Global methods;

### Section

[](#section)

#### Global methods

[](#global-methods)

```
PhpIPAM::sections();
PhpIPAM::section($section);
PhpIPAM::sectionSubnets($section);
PhpIPAM::sectionByName($section);
PhpIPAM::sectionCreate($section);
PhpIPAM::sectionUpdate($section, $newData);
PhpIPAM::sectionDrop($section);
```

#### Model methods

[](#model-methods)

```
$section->update();
$section->drop();
$section->subnets();
```

### Device

[](#device)

#### Global methods

[](#global-methods-1)

```
PhpIPAM::devices();
PhpIPAM::device($device);
PhpIPAM::deviceAddresses($device);
PhpIPAM::deviceSubnets($device);
PhpIPAM::deviceCreate($data);
PhpIPAM::deviceUpdate($device, $data);
PhpIPAM::deviceDrop($device);
```

#### Model methods

[](#model-methods-1)

```
$device->subnets();
$device->addresses();
$device->deviceTypes();
$device->update();
$device->drop();
$device->ping();
```

### Subnet

[](#subnet)

#### Global methods

[](#global-methods-2)

```
PhpIPAM::subnet($subnet);
PhpIPAM::subnetUsage($subnet);
PhpIPAM::subnetFreeAddress($subnet);
PhpIPAM::subnetSlaves($subnet);
PhpIPAM::subnetSlavesRecursive($subnet);
PhpIPAM::subnetAddresses($subnet);
PhpIPAM::subnetIp($subnet, "192.168.1.4");
PhpIPAM::subnetFreeSubnet($subnet, $mask);
PhpIPAM::subnetFreeSubnets($subnet, $mask);
PhpIPAM::subnetCustomFields();
PhpIPAM::subnetByCidr("192.168.1.0/24");
PhpIPAM::subnetCreate($subnetData);
PhpIPAM::subnetCreateInSubnet($subnet, $subnetData);
PhpIPAM::subnetUpdate($subnet, $subnetData);
PhpIPAM::subnetResize($subnet, $mask);
PhpIPAM::subnetSplit($subnet, $number);
PhpIPAM::subnetDrop($subnet);
PhpIPAM::subnetTruncate($subnet);
```

#### Model methods

[](#model-methods-2)

```
$subnet->update();
$subnet->drop();
$subnet->usage();
$subnet->freeAddress();
$subnet->slaves();
$subnet->slavesRecursive();
$subnet->addresses();
$subnet->ip("192.168.168.4");
$subnet->freeSubnet($mask);
$subnet->freeSubnet($mask);
$subnet->resize($mask);
$subnet->split($number);
$subnet->truncate();
```

### Address

[](#address)

#### Global methods

[](#global-methods-3)

```
PhpIPAM::address($address);
PhpIPAM::ping($address);
PhpIPAM::addressByIp("10.140.128.1");
PhpIPAM::addressByHostname("phpipam.net");
PhpIPAM::addressCustomFields();
PhpIPAM::addressTags();
PhpIPAM::addressTag($tag);
PhpIPAM::tagAddresses($tag);
PhpIPAM::addressCreate($data);
PhpIPAM::addressCreateFirstFree($subnet);
PhpIPAM::addressUpdate($address, $data);
PhpIPAM::addressDrop($address);
```

#### Model methods

[](#model-methods-3)

```
$address->update();
$address->drop();
$address->ping();
```

### Circuit

[](#circuit)

#### Global methods

[](#global-methods-4)

```
PhpIPAM::circuits();
PhpIPAM::circuit($circuit);
PhpIPAM::circuitCreate($circuit);
PhpIPAM::circuitUpdate($circuit, $newData);
PhpIPAM::circuitDrop($circuit);
```

#### Model methods

[](#model-methods-4)

```
$circuit->update();
$circuit->drop();
$circuit->subnets();
```

### Tools

[](#tools)

#### Global methods

[](#global-methods-5)

```
PhpIPAM::locations();
PhpIPAM::location($location);
PhpIPAM::locationCreate($location);
PhpIPAM::locationUpdate($location, $newData);
PhpIPAM::locationDrop($location);

PhpIPAM::tags();
PhpIPAM::tag($tag);
PhpIPAM::tagCreate($tag);
PhpIPAM::tagUpdate($tag, $newData);
PhpIPAM::tagDrop($tag);

PhpIPAM::deviceTypes();
```

#### Model methods

[](#model-methods-5)

```
$location->update();
$location->drop();

$tag->update();
$tag->drop();
```

License
-------

[](#license)

[GPL-3.0](./LICENSE)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 97.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~65 days

Recently: every ~99 days

Total

18

Last Release

1797d ago

Major Versions

v0.1.11 → 1.0.02019-08-12

PHP version history (3 changes)v0.1.3PHP &gt;=7.0

1.0.0PHP &gt;=7.2

1.1.1PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cf4c7b28e214ca0005daa9e1235edf29238bd182b3083554785a964877c994b?d=identicon)[sorribes22](/maintainers/sorribes22)

---

Top Contributors

[![sorribes22](https://avatars.githubusercontent.com/u/23049412?v=4)](https://github.com/sorribes22 "sorribes22 (87 commits)")[![sa0azt](https://avatars.githubusercontent.com/u/48179269?v=4)](https://github.com/sa0azt "sa0azt (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/axsor-laravel-phpipam/health.svg)

```
[![Health](https://phpackages.com/badges/axsor-laravel-phpipam/health.svg)](https://phpackages.com/packages/axsor-laravel-phpipam)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
