PHPackages                             urlhive/urlhive-laravel - 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. [API Development](/categories/api)
4. /
5. urlhive/urlhive-laravel

ActiveLibrary[API Development](/categories/api)

urlhive/urlhive-laravel
=======================

Laravel SDK for URLHive API

v0.4.0-beta(4mo ago)091MITPHPPHP ^8.1

Since Jan 24Pushed 4mo agoCompare

[ Source](https://github.com/urlhive/urlhive-laravel)[ Packagist](https://packagist.org/packages/urlhive/urlhive-laravel)[ RSS](/packages/urlhive-urlhive-laravel/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (5)Dependencies (5)Versions (11)Used By (0)

URLHive Laravel SDK
===================

[](#urlhive-laravel-sdk)

This is the official Laravel SDK for the [URLHive](https://urlhive.net) API.

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

[](#installation)

You can install the package via composer:

```
composer require urlhive/urlhive-laravel
```

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=urlhive-config
```

Add your API credentials to `.env`:

```
URLHIVE_API_URL=https://api.urlhive.net
URLHIVE_API_TOKEN=your-api-token
```

Usage
-----

[](#usage)

### URLs

[](#urls)

```
use UrlHive\Laravel\Facades\UrlHive;

// List URLs
$urls = UrlHive::url()->list(['page' => 1]);

// Shorten a URL
// custom_alias: 3-20 characters, alpha-numeric/dash
$response = UrlHive::url()->shorten('https://example.com', [
    'custom_alias' => 'my-link',
    'expires_at' => '2026-12-31'
]);

// Get URL Details
$details = UrlHive::url()->get('my-link');

// Update URL
UrlHive::url()->update('my-link', ['url' => 'https://new-url.com']);

// Toggle URL Status
// Enables or disables the short link
UrlHive::url()->toggle('my-link');

// Export URL Stats (CSV)
// Returns a CSV string containing detailed click data
$csv = UrlHive::url()->export('my-link');

// Delete URL
UrlHive::url()->delete('my-link');
```

### Analytics

[](#analytics)

```
// Get URL Stats
// Includes: Timeline, Countries, Cities, Devices, Browsers, Referrers
$stats = UrlHive::analytics()->stats('my-link');
```

### Bio Pages

[](#bio-pages)

Manage your "Link in Bio" page.

```
// Get Bio Page
$bio = UrlHive::bio()->show();

// Create/Update Bio Page
// Themes: 'minimal', 'dark', 'colorful'
UrlHive::bio()->store([
    'username' => 'john.doe',
    'title' => 'John Doe',
    'bio' => 'Software Engineer',
    'theme' => 'dark'
]);

// Add Link to Bio
$link = UrlHive::bio()->addLink([
    'username' => 'john.doe',
    'title' => 'My Portfolio',
    'url' => 'https://john.doe/portfolio',
    'icon' => 'briefcase' // Optional icon identifier
]);

// Update Bio Link
UrlHive::bio()->updateLink($link['id'], ['title' => 'New Portfolio Title']);

// Reorder Links
UrlHive::bio()->reorderLinks(['id1', 'id3', 'id2']);

// Delete Bio Link
UrlHive::bio()->deleteLink($link['id']);
```

### Link Lists

[](#link-lists)

Create and manage collections of links. Public lists can be viewed by anyone.

```
// List Link Lists
$lists = UrlHive::linkLists()->list();

// Create Link List
$list = UrlHive::linkLists()->create([
    'name' => 'My Tech Stack',
    'is_public' => true
]);

// Get Link List
$details = UrlHive::linkLists()->get($list['id']);

// Update Link List
UrlHive::linkLists()->update($list['id'], ['name' => 'Updated Name']);

// Delete Link List
UrlHive::linkLists()->delete($list['id']);

// Add Item
$item = UrlHive::linkLists()->addItem($list['id'], [
    'title' => 'Laravel',
    'url' => 'https://laravel.com',
    'description' => 'The PHP Framework for Web Artisans'
]);

// Update Item
UrlHive::linkLists()->updateItem($item['id'], ['title' => 'Laravel Framework']);

// Track Item Click
UrlHive::linkLists()->trackItemClick($item['id']);

// Delete Item
UrlHive::linkLists()->deleteItem($item['id']);
```

### Workspaces

[](#workspaces)

> **Note:** The Workspaces API is only available for accounts on the **Enterprise** plan.

```
// List Workspaces
$workspaces = UrlHive::workspaces()->list();

// Create Workspace
$workspace = UrlHive::workspaces()->create(['name' => 'My Team']);

// Update Workspace
UrlHive::workspaces()->update($workspace['id'], ['name' => 'My New Team Name']);

// Switch Workspace
// Changes the active workspace for subsequent API requests
UrlHive::workspaces()->switch($workspace['id']);
```

### Pixels

[](#pixels)

Manage tracking pixels for retargeting (Facebook, Google Analytics, etc.).

```
// List Pixels
$pixels = UrlHive::pixels()->list();

// Create Pixel
// Types: 'facebook', 'google-analytics', 'custom'
$pixel = UrlHive::pixels()->create([
    'name' => 'Facebook Ads',
    'type' => 'facebook',
    'pixel_id' => '1234567890'
]);

// Get Pixel
$details = UrlHive::pixels()->get($pixel['id']);

// Update Pixel
UrlHive::pixels()->update($pixel['id'], ['name' => 'Updated Pixel Name']);

// Delete Pixel
UrlHive::pixels()->delete($pixel['id']);
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance75

Regular maintenance activity

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.2% 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 ~2 days

Total

5

Last Release

143d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e71d284fd2e01efdb0eda7625243d46824c259137aeaba73b68b4e562cda5023?d=identicon)[klc](/maintainers/klc)

---

Top Contributors

[![klc](https://avatars.githubusercontent.com/u/26712751?v=4)](https://github.com/klc "klc (13 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (5 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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