PHPackages                             bramin/cuttlylaravel - 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. bramin/cuttlylaravel

ActiveLibrary[API Development](/categories/api)

bramin/cuttlylaravel
====================

Interact with the Cutt.ly API via Laravel's Http helper and facade

v1.0.0(4y ago)14[3 PRs](https://github.com/b-ramin/CuttlyLaravel/pulls)MITPHPPHP ^8.0

Since Apr 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/b-ramin/CuttlyLaravel)[ Packagist](https://packagist.org/packages/bramin/cuttlylaravel)[ Docs](https://github.com/b-ramin/cuttly-laravel)[ RSS](/packages/bramin-cuttlylaravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (5)Used By (0)

Interact with the Cutt.ly API via Laravels Http Helper
======================================================

[](#interact-with-the-cuttly-api-via-laravels-http-helper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cd6253aa48196710431ae96843ab5f8146f1835a82a64a89974c68d18be6fd51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6272616d696e2f637574746c796c61726176656c2e7376673f7374796c65)](https://packagist.org/packages/bramin/cuttlylaravel)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/02f165a5e9eb4b064a6535cd8bb4ecdba8a6a53737424a7d1cf925a1eb059514/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f622d72616d696e2f637574746c796c61726176656c2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/b-ramin/cuttlylaravel/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e0db861fa3fdbaec77c9d536e0dae36c13c693285e6538e7613ff07c99ec4b51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6272616d696e2f637574746c796c61726176656c2e7376673f7374796c65)](https://packagist.org/packages/bramin/cuttlylaravel)

Cutt.ly is a URL shortening service. This package uses Laravel's Http helper to interact with that service to create, update and delete shortened links.

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

[](#installation)

You can install the package via composer:

```
composer require bramin/cuttlylaravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="cuttly-laravel-config"
```

This is the contents of the published config file:

```
return [
    'key' => '',
    'user_domain' => '0',
    'no_title' => '1',
    'public' => '1',
];
```

Make sure to set the *key* to your key from Cutt.ly

Usage
-----

[](#usage)

### Include the Cuttly Facade

[](#include-the-cuttly-facade)

```
use Bramin\CuttlyPHP\Facades\Cuttly;
```

### Test the api status

[](#test-the-api-status)

```
$success = Cuttly::ping();
```

### Create a new link:

[](#create-a-new-link)

```
$details = Cuttly::create('https://google.com', '', false, true, true);
```

#### Parameters:

[](#parameters)

- `short`: The URL to be shortened (required)
- `name`: The first and only uri segment after the domain name. Passing null or an empty array will generate a random and unique string.
- `userDomain`: whether it should use the custom domain name instead of cutt.ly. Defaults to `false`.
- `noTitle`: Disables the title lookup to improve speed. Defaults to `true`.
- `public`: Whether the link is public or private. Defaults to `true`.

### Link analytics:

[](#link-analytics)

```
$success = Cuttly::getAnalytics('https://cutt.ly/abcd', '2022-04-01', '2022-05-01');
```

#### Parameters:

[](#parameters-1)

- `short`: The URL to be shortened (required)
- `dateFrom`: Sets the start date of the period to return data for. Format: `YYYY-MM-DD`, e.g. `2021-03-02`
- `dateTo`: Sets the end date of the period to return data for. Format: `YYYY-MM-DD`, e.g. `2021-03-02`

### Add a tag to a link:

[](#add-a-tag-to-a-link)

```
$success = Cuttly::addTag('https://cutt.ly/abcd', 'tagname');
```

### Update the source of a link:

[](#update-the-source-of-a-link)

```
$success = Cuttly::updateSource('https://cutt.ly/abcd', 'http://www.google.com');
```

### Update the title of a link:

[](#update-the-title-of-a-link)

```
$success = Cuttly::updateTitle('https://cutt.ly/abcd', 'Google Home Page');
```

### Delete a link:

[](#delete-a-link)

```
$success = Cuttly::delete('https://cutt.ly/abcd');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Brett Ramin](https://github.com/b-ramin)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.4% 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

Unknown

Total

1

Last Release

1494d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72ee34310f047d19dedb909d5933c9f19c2404818e6f5e805ccd6f70f7f4bbc4?d=identicon)[b-ramin](/maintainers/b-ramin)

---

Top Contributors

[![b-ramin](https://avatars.githubusercontent.com/u/25067223?v=4)](https://github.com/b-ramin "b-ramin (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")

---

Tags

laravelurl shortenerurlshortenercuttlycuttly-laravelb-raminbramin

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/bramin-cuttlylaravel/health.svg)

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

###  Alternatives

[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)

PHPackages © 2026

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