Route parameters outside controller

Submitted by YOzaz - 3 years ago

In case you want to access Route parameters outside controller, you can access current Route object and extract parameters from there.

$current_params = Route::current()->parameters();
comments powered by Disqus

Ads cover the costs of maintaining Laravel-tricks