Coder Social home page Coder Social logo

Route prefixes/prehandlers about route HOT 5 CLOSED

thephpleague avatar thephpleague commented on July 22, 2024
Route prefixes/prehandlers

from route.

Comments (5)

philipobenito avatar philipobenito commented on July 22, 2024

What is the intended outcome of the example you've given? So that you can have a set of routes that are automatically prefixed etc? Such as versioning an API?

from route.

outrunthewolf avatar outrunthewolf commented on July 22, 2024

Yeah basically.

domain - checks any requests are being served under the correct server name.
prefix - prefixes any sub routes with that string, i.e. v1, beta, etc...

prefix would be handy, but I suppose there are other ways around it. What I'm looking for really is a pre-route handler call, or function I can tie into.

So once a route matches I can check a few other things like are you authorised for that route, have you passed the correct prefix, once they've passed that check I can route them to the actual function or class that is associated with that route.

from route.

philipobenito avatar philipobenito commented on July 22, 2024

Well this is definitely something that could be implemented via a strategy, but also something I'm going to think about through development of v2 over the next couple of weeks so if it's not urgent, I can involve you in that process once I get to it.

from route.

philipobenito avatar philipobenito commented on July 22, 2024

Groups picked up as part of 2.0.0

from route.

outrunthewolf avatar outrunthewolf commented on July 22, 2024

👍 awesome

from route.

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.