mercredi 28 juin 2017

How to pass a static variable to a Laravel route?

I try to rewrite Symfony routes to Laravel routes. The problem is that some Symfony routes take defaults and go the same controller. Can I add some arguments to the Laravel routes to accomplish the same?

e.g. Symfony yaml

 path: /account/
    defaults:
        _controller: "legacy.controller.fallback:Somefunt"
        pag_act: "secret"
        m_act: "home"

 path: /account2/
        defaults:
            _controller: "legacy.controller.fallback:Somefunt"
            pag_act: "public"
            m_act: "home"

e.g. laravel

Route::any('/account', 'SomeSymfonyController@Somefunt');

As you can see: the defaults for these 2 Symfony routes are different (pag_act), can I pass this in Laravel too?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uh0jtK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire