Home Pass variable into Laravel {{ route }} helper
Reply: 0

Pass variable into Laravel {{ route }} helper

user517 Published in June 23, 2018, 7:57 am

I have routes for /admin/login and also for /user/login

I'm looking for both of the views to share the same layout file and so looking to pass the first segment (admin or user) into the route helper.

Is that possible?

So effectively, I'd be looking to do something like:

{{ route($thisIsDynamic.'.login') }}

where $thisIsDynamic would either be admin or user depending on the URL.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.334051 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO