Coder Social home page Coder Social logo

Comments (4)

taylorotwell avatar taylorotwell commented on May 5, 2024

Yeah, you're probably right. Will look into it.

from framework.

jasonlewis avatar jasonlewis commented on May 5, 2024

It's a simple fix, just drop the microtime(true) off of the end of a generated route name. The Symfony routing component will drop an existing route name when adding a route so the route defined last will always have precedence.

I'll send a PR.

from framework.

taylorotwell avatar taylorotwell commented on May 5, 2024

OK, Thanks.

from framework.

xxpepe84xx avatar xxpepe84xx commented on May 5, 2024

The overriding of routes don't work in every case. If the semantic is equal but the spelling is different the router use the first declared route.

Works:

Route::get('part1/{part2}/{part3}', function($part2, $part3)
{
    return 'This does not work. The second route is used.';
});

Route::get('part1/{part2}/{part3}', function($part2, $part3)
{
    return 'This one will be run.';
});

Fails:

Route::get('part1/{part2}/{part3}', function($part2, $part3)
{
    return 'This one will be run.';
});

Route::get('part1/{part4}/{part5}', function($part4, $part5)
{
    return 'This does not work. The first route is used.';
});

Fails:

Route::get('part1/{part2}/{part3}', function($part2, $part3)
{
    return 'This one will be run.';
});
Route::get('part1/test/test', function()
{
    return 'This does not work. The first route is used.';
});

from framework.

Related Issues (20)

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.