PHPackages                             illuminatech/model-route - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. illuminatech/model-route

ActiveLibrary[HTTP &amp; Networking](/categories/http)

illuminatech/model-route
========================

Allows continuing route matching in case bound model does not exist

1.0.7(1mo ago)111.2kBSD-3-ClausePHPCI failing

Since Oct 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/illuminatech/model-route)[ Packagist](https://packagist.org/packages/illuminatech/model-route)[ GitHub Sponsors](https://github.com/klimov-paul)[ Patreon](https://www.patreon.com/klimov_paul)[ RSS](/packages/illuminatech-model-route/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (8)Versions (9)Used By (0)

 [ ![](https://avatars1.githubusercontent.com/u/47185924) ](https://github.com/illuminatech)

Real Laravel Model Route Matching
=================================

[](#real-laravel-model-route-matching)

This extension allows continuing route matching in case bound model does not exist.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/0748a3a6b3a3a87d18fbcaf871b70028f9c9442cdbbaee6f7a11251d14bcb7d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696c6c756d696e61746563682f6d6f64656c2d726f7574652e737667)](https://packagist.org/packages/illuminatech/model-route)[![Total Downloads](https://camo.githubusercontent.com/fc632d393b5bc7002c15277d6820d74a38b6d0512b9420d372c5be8ab3dfc414/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696c6c756d696e61746563682f6d6f64656c2d726f7574652e737667)](https://packagist.org/packages/illuminatech/model-route)[![Build Status](https://github.com/illuminatech/model-route/workflows/build/badge.svg)](https://github.com/illuminatech/model-route/actions)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist illuminatech/model-route

```

or add

```
"illuminatech/model-route": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

This extension allows continuing route matching in case bound model does not exist.

Imagine we need to create URL structure like the one GitHub has. There are individual users and organizations, each of which has its own page responding the URL starting from their name:

-  - user's page, where "klimov-paul" - name of the user.
-  - organization's page, where "illuminatech" - name of the organization.

Most likely, in your project users and organizations will be stored in different database tables, so the Laravel routes configuration for this case will look like following:

```
