PHPackages                             open-southeners/laravel-model-permalink - 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. [Database &amp; ORM](/categories/database)
4. /
5. open-southeners/laravel-model-permalink

ActiveLibrary[Database &amp; ORM](/categories/database)

open-southeners/laravel-model-permalink
=======================================

Add permalinks to your application's Eloquent models

1.1.0(2y ago)14MITPHPPHP ^8.0

Since Oct 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/open-southeners/laravel-model-permalink)[ Packagist](https://packagist.org/packages/open-southeners/laravel-model-permalink)[ GitHub Sponsors](https://github.com/sponsors/open-southeners)[ RSS](/packages/open-southeners-laravel-model-permalink/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Model Permalink [![required php version](https://camo.githubusercontent.com/b1337c10a4fc595a9adf2a26941930f3b573c3083cf1ba861162612f4f2010da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f70656e2d736f757468656e6572732f6c61726176656c2d6d6f64656c2d7065726d616c696e6b)](https://www.php.net/supported-versions.php) [![codecov](https://camo.githubusercontent.com/ffb80e9fb6bf39ca2b324a60427a7636dd87a110a2275d6caae6c6283361a3e2/68747470733a2f2f636f6465636f762e696f2f67682f6f70656e2d736f757468656e6572732f6c61726176656c2d6d6f64656c2d7065726d616c696e6b2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d636f6465636f765f62616467655f746f6b656e)](https://codecov.io/gh/open-southeners/laravel-model-permalink) [![Edit on VSCode online](https://camo.githubusercontent.com/1e825ede949540f53ec4dce8dc8ad93376081856a01b7e3ce2f24f41c9133405/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7673636f64652d656469742532306f6e6c696e652d626c75653f6c6f676f3d76697375616c73747564696f636f6465)](https://vscode.dev/github/open-southeners/laravel-model-permalink)
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-model-permalink---)

Add permalinks to your application's Eloquent models

Getting started
---------------

[](#getting-started)

```
composer require open-southeners/laravel-model-permalink

```

### Usage

[](#usage)

First run the command to publish the config and **required migrations** files:

```
php artisan vendor:publish --provider="OpenSoutheners\\LaravelModelPermalink\\ServiceProvider"
```

Then run new migrations:

```
php artisan migrate
```

And add the `PermalinkAccess` interface, `HasPermalinks` trait and `getPermalink` method to the models you want to have permalinks:

```
