Summer Sale! All accounts are 50% off this week.

strategicsdemexico's avatar

Get route params in service provider?

is that possible? I want to get a route param in the service provider class, how to do it?

0 likes
4 replies
DiogoGomes's avatar

Hi,

Yes, its possible:

$parameters = Route::current()->parameters();

Cheers

2 likes
bestmomo's avatar
Level 52
$this->app->request->all()
2 likes
strategicsdemexico's avatar

it works i just use

$this->app->request->route('slug')

to get the slug in the url

Please or to participate in this conversation.