How do these routes work?

  1. 4 years ago

    More of a Laravel question I guess but Wardrobe is a good example.

    I'm trying to figure out after install when I comment out all the install routes how does Laravel know to load Wardrobe? Nothing in bootstrap, nothing in app/start/, and nothing in app/routes but it magically works. :-)

  2. ericbarnes

    Nov 20 Administrator

    What it does is inject it's own routes via the service provider of the package. Here is the place:

  3. Edited 4 years ago by isimmons

    huh, interesting. I didn't know you could do that with Laravel.

    Seems strange to me if it's not loaded or called explicitly in a startup file or the main routes file. I've got more Laravel learning to do. :-)

    UPDATE: Ah, I forgot Laravel automatically runs boot() if it is present when the service provider is loaded.


or Sign Up to reply!