2017 © Pedro PelĆ”ez
 

library dynamic-routing

A tool for adding dynamic routes to a project, such as routes defined in a database table, etc.

image

rupertjeff/dynamic-routing

A tool for adding dynamic routes to a project, such as routes defined in a database table, etc.

  • Tuesday, March 18, 2014
  • by rupertjeff
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Dynamic Routing

Build Status, (*1)

I’ve found that I often times need to have functionality for client/CMS defined routing in my sites, so I put together a quick library that deals with the creation of said routes., (*2)

Usage

You can pull the package in through Composer:, (*3)

{
    "require": {
        "rupertjeff/dynamic-routing": "dev-master"
    }
}

Once the package exists and it’s being loaded into your project, create an instance of Rupertjeff\DynamicRouting\Contracts\RouteCreator. Give that to this package and it’ll go from there!, (*4)

// Where $creator is an instance of Rupertjeff\DynamicRouting\Contracts\RouteCreator
DynamicRouter::create($creator)

Laravel 4

If you’re using Laravel 4 (as I do, mostly), you can add the included ServiceProvider and Facade to make things easier for you. Just add, (*5)

'Rupertjeff\DynamicRouting\Laravel\DynamicRoutingServiceProvider'

to your 'providers' array in ./app/config/app.php, and, (*6)

'DynamicRouter' => 'Rupertjeff\DynamicRouting\Laravel\Facade'

to your 'aliases' array. Don’t like the Laravel Facade approach? Grab it off of $this->app['dynamicRouter'] or create your own out of the IoC container., (*7)

Other Projects

Create an implementation of Rupertjeff\DynamicRouting\Contract\Router and make sure to create a Rupertjeff\DynamicRouting\Router with that first class as the first parameter to the constructor., (*8)

// Where $router is an instance of Rupertjeff\DynamicRouting\Contract\Router
$dynamicRouter = new Rupertjeff\DynamicRouting\Router($router);

Then just call, (*9)

// Where $creator is an instance of Rupertjeff\DynamicRouting\Contracts\RouteCreator
$dynamicRouter->create($creator);

That’s it!, (*10)

Contributing

Please send me any issues/pull requests as you find issues, etc. I’m always wanting feedback on my code as well, so mention something if you see it., (*11)

License

This Dynamic Router is open sourced and licensed under the MIT License., (*12)

The Versions

18/03 2014

dev-master

9999999-dev

A tool for adding dynamic routes to a project, such as routes defined in a database table, etc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Rupert

route routing router

18/03 2014

0.2.2

0.2.2.0

A tool for adding dynamic routes to a project, such as routes defined in a database table, etc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeff Rupert

route routing router

18/03 2014

0.2.1

0.2.1.0

  Sources   Download

The Requires

 

The Development Requires

by Jeff Rupert

18/03 2014

0.2.0

0.2.0.0

  Sources   Download

The Requires

 

The Development Requires

by Jeff Rupert

18/03 2014

0.1.0

0.1.0.0

  Sources   Download

The Requires

 

The Development Requires

by Jeff Rupert