mardi 26 décembre 2017

How can i get uri segment in routes?

I am new to laravel and my laravel version is 5.5

In my routes file. I call Segment method in Request class

Like below :

var_dump(Request::segment(1));

And then it returns this message

Non-static method Illuminate\Http\Request::segment() should not be called statically

So... do I need to make new Request instance?

Or is there any more effective way to achieve what I want?

Any suggestion or advice would be appreciated.

Thank you in advance



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

Aucun commentaire:

Enregistrer un commentaire