PHPackages                             jobmetric/laravel-url - 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. jobmetric/laravel-url

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jobmetric/laravel-url
=====================

It is a package for url and slug storage management in each model that you can use in your Laravel projects.

2.1.0(6mo ago)642[1 issues](https://github.com/jobmetric/laravel-url/issues)2MITPHPPHP &gt;=8.0.1CI passing

Since Jun 13Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/jobmetric/laravel-url)[ Packagist](https://packagist.org/packages/jobmetric/laravel-url)[ Docs](https://doc.jobmetric.net/package/laravel-url)[ RSS](/packages/jobmetric-laravel-url/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (14)Used By (2)

[![Contributors](https://camo.githubusercontent.com/bb912b54f5e9b1091ca8274f036f4152205ef8275d05c5c4d1ea670928a479a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6a6f626d65747269632f6c61726176656c2d75726c2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/laravel-url/graphs/contributors)[![Forks](https://camo.githubusercontent.com/7b5f24c1173d52050e8e4c9497cc811ce6b79ce2cbd673d37fe75092cb7fd8e4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a6f626d65747269632f6c61726176656c2d75726c2e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d466f726b)](https://github.com/jobmetric/laravel-url/network/members)[![Stargazers](https://camo.githubusercontent.com/a4dbb65974c8afaf572a30c135d46a197439d904d56f38640ff65d6786f782b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a6f626d65747269632f6c61726176656c2d75726c2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/laravel-url/stargazers)[![MIT License](https://camo.githubusercontent.com/6eac58de1f411924db39c0b0de7de8d574290459e6de7c883c2d29956a21cf61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f626d65747269632f6c61726176656c2d75726c2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/laravel-url/blob/master/LICENCE.md)[![LinkedIn](https://camo.githubusercontent.com/eb590f47a3fca74584d18db8dd3e985ae3d786f50cd41b7530c3af3885da233c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4c696e6b6564496e2d626c75652e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e26636f6c6f72423d353535)](https://linkedin.com/in/majidmohammadian)

Laravel URL
===========

[](#laravel-url)

**SEO-Friendly URL and Slug Management**

Laravel URL simplifies URL and slug management in Laravel applications. Stop wrestling with manual URL generation and start building SEO-friendly, versioned URLs that automatically handle redirects, conflicts, and cascading updates. It provides automatic URL versioning, intelligent conflict detection, cascading URL updates, and smart fallback routing—all designed to make URL management effortless while maintaining SEO best practices.

Why Laravel URL?
----------------

[](#why-laravel-url)

### Automatic URL Versioning

[](#automatic-url-versioning)

Track complete URL history with automatic versioning, ensuring that old URLs redirect to new ones, preserving SEO value and preventing broken links.

### Intelligent Conflict Detection

[](#intelligent-conflict-detection)

Enforce global uniqueness for active URLs and slugs, preventing duplicate content issues and ensuring a clean URL structure across your application.

### Cascading URL Updates

[](#cascading-url-updates)

Automatically update child URLs when parent slugs change, maintaining hierarchical URL integrity without manual intervention.

### Smart Fallback Routing

[](#smart-fallback-routing)

Resolve unmatched request paths against the versioned `urls` table, providing automatic 301 redirects for legacy URLs and handling 404s gracefully.

What is URL Management?
-----------------------

[](#what-is-url-management)

URL management is the process of creating, storing, and maintaining clean, SEO-friendly URLs for your application's content. In traditional Laravel applications, managing URLs often involves:

- Manually creating slugs for each model
- Implementing custom logic for URL versioning and redirects
- Handling URL conflicts and uniqueness checks
- Building custom fallback routes for unmatched URLs

Laravel URL solves these challenges by providing a unified system that works seamlessly with your Eloquent models. You can:

- **Manage slugs** - One slug per model with optional collection grouping
- **Version URLs** - Automatic versioning tracks complete URL history
- **Detect conflicts** - Global uniqueness enforcement for active URLs
- **Cascade updates** - Automatically update child URLs when parents change
- **Handle soft deletes** - Graceful conflict checking on restore
- **Rebuild URLs** - Bulk URL resynchronization for migrations

What Awaits You?
----------------

[](#what-awaits-you)

By adopting Laravel URL, you will:

- **Improve SEO rankings** - Clean, consistent URLs and automatic redirects
- **Reduce development time** - Automate URL management tasks
- **Enhance user experience** - Prevent broken links and provide intuitive URLs
- **Simplify content management** - Easy slug and URL updates
- **Scale effortlessly** - Handle thousands of URLs with robust performance
- **Maintain clean code** - Intuitive API that follows Laravel conventions

Quick Start
-----------

[](#quick-start)

Install Laravel URL via Composer:

```
composer require jobmetric/laravel-url
```

Then publish the migration and run it:

```
php artisan vendor:publish --tag=url-migrations
php artisan migrate
```

Documentation
-------------

[](#documentation)

Ready to transform your Laravel applications? Our comprehensive documentation is your gateway to mastering Laravel URL:

**[📚 Read Full Documentation →](https://jobmetric.github.io/packages/laravel-url/)**

The documentation includes:

- **Getting Started** - Quick introduction and installation guide
- **HasUrl Trait** - Core trait for URL and slug management
- **UrlContract Interface** - Define canonical URLs for your models
- **Slug &amp; Url Models** - Database models for slugs and URLs
- **Events** - Hook into URL lifecycle
- **Exceptions** - Handle URL-related errors
- **Validation Rules** - `SlugExistRule` for uniqueness
- **API Resources** - `SlugResource` and `UrlResource` for API responses
- **FullUrlController** - Smart fallback routing
- **HasUrlType Trait** - Typeify integration for URL capability

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

[](#contributing)

Thank you for participating in `laravel-url`. A contribution guide can be found [here](CONTRIBUTING.md).

License
-------

[](#license)

The `laravel-url` is open-sourced software licensed under the MIT license. See [License File](LICENCE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance65

Regular maintenance activity

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.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 ~47 days

Recently: every ~95 days

Total

13

Last Release

186d ago

Major Versions

1.8.1 → 2.0.02025-09-10

### Community

Maintainers

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

---

Top Contributors

[![MajidMohammadian](https://avatars.githubusercontent.com/u/2099965?v=4)](https://github.com/MajidMohammadian "MajidMohammadian (101 commits)")[![Bagheri-Matin](https://avatars.githubusercontent.com/u/239607447?v=4)](https://github.com/Bagheri-Matin "Bagheri-Matin (4 commits)")

---

Tags

laravellaravel-packagepackageslugslugableurlsluglaravelpackagemodeltraitjobmetric

### Embed Badge

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

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

###  Alternatives

[creasi/laravel-nusa

A Laravel package that aim to provide Indonesia' Administrative Data

997.9k3](/packages/creasi-laravel-nusa)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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