Code Monkey home page Code Monkey logo

enhanced-router's People

Contributors

jasonlewis avatar xees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enhanced-router's Issues

Allow dynamic subdomain routing

What I would like to see is dynamic subdomain routing as an example:

Route::group(array('subdomain' => 'example'), function()
{

});

which would respond to: example.domain.com or example.localhost and so on...

Form::open does not generate a language prefix using enhanced router.

Goodday, i have the following bit of code for the route:

Route::group(
    array(
        'prefix' => '{locale}'
        ),
    function(){
            Route::post('admin', 'AdminController@postLogin');
    }
)->where('locale', array('en', 'ar'));

Now, this works perfectly fine.

But when i generate a form using Form::open, the arguments 'route' and 'action' of the Form::open function does not do the following:

  1. generate a language prefix and append it to the Form::open. before the route:

    What should happen:

    <form action="http://wscms.dev/en/admin/login">
    

    What is happening:

    <form action="http://wscms.dev/admin/login">
    
  2. Laravel does not detect a route with the Form::open to action, even though the action is correct and exists. this is because no language prefix is specified, and a language prefix is required by the route group using the enhanced router.

When i removed Enhanced router and setted the prefix to null. it worked fine, and it generated a language prefix before every form action.

Error after updating laravel via composer ..

hey,
today after updating laravel i got this problem which is :
"findPatternFilters() should be compatible with Illuminate\Routing\Router::findPatternFilters($method, $path)" ..
and here is the error message :

{"error":{"type":"ErrorException","message":"Declaration of JasonLewis\\EnhancedRouter\\Router::findPatternFilters() should be compatible with Illuminate\\Routing\\Router::findPatternFilters($method, $path)","file":"\/Users\/Zaher\/Sites\/klass\/vendor\/jasonlewis\/enhanced-router\/src\/JasonLewis\/EnhancedRouter\/Router.php","line":8}}

Filter on Group Domain Route is eating the dyanimc url variable

I have a controller route defined no group and it works fine.

Route::controller('users', 'UserController');

Here is the method signature

    public function getShow($id) {

When I add this Route Group with a filter the $id variable does not get passed in anymore.

Route::group(array('domain' => '{domain}'), function()
{
    Route::controller('users', 'UserController');
})->where('domain', '(local.mydomain.com|mydomain.elasticbeanstalk.com)');

The route group with the where is working working fine. It just eats the $id variable and doesn't pass it into the getShow($id) method anymore.

Versioning

Jason in your readme you have v1.0.3, but composer still installs v1.0.2 ( b321e52 ). Also noticed that v1.0.3 never made it as a GH Release, nor was it tagged for Packagist to pick up the new version.

Enhance Router breaks URL::action() ?

It seems when I try to do reverse routing with the enhanced controller that my actions can't be found. Is there a way around this? It's also breaking my unit testing when I try to $this->call(); Thanks!

Support for Laravel 4.2

I'm trying to install enhanced route for laravel 4.2 but i still get error. Is it support laravel 4.2.

Thank you in advance.

Remove a parameter

Hi.

You said

It's important to note that the locale is actually given to each route as a parameter. The parameter is also given to every method of every controller that is within the group. When your route requires a parameter of its own it will be given after the prefix parameter.

If I have a big site and I don't want to modify all my methods to add the $locale parameter to each methods how can I remove it ?

App::missing handle in group

Can you add support for making group-only App::missing handling? For example:

Route::group(array('domain' => '{domain}'), function () {
    // Our site routes
    App::missing(function($exception)
    {
        // Return nice page with message, that this page does not exists
    });
})->where('domain', 'example.com');

Route::group(array('domain' => '{domain}'), function () {
    // Our API Routes
    App::missing(function($exception)
    {
        //Return JSON error, that this API function does not exists
    });
})->where('domain', 'api.example.com');

P.S. Sorry for my bad English..

Support for Laravel 4.1

There are dependency version problem when updating to Laravel 4.1

does changing this could fix the problem?

     "illuminate/support": "4.0.*",
      "illuminate/routing": "4.0.*"

to

     "illuminate/support": "4.0.0",
      "illuminate/routing": "4.0.0"

Allow for header based route groups

I know it's sunday,

Since this package enhances the routing in a powerful way, why not enhance them even more?

I would love to be able to route to a different group based on the http headers sent by the client. do you think it's possible? My use case is the versioning of an API. Using headers would be more in line with the hateoas recommendations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.