Route · Mecha CMS

Do something if URL path matched with pattern.

$route::contain()

Author: Taufik Nurrohman · 190 Views

Tweet

Check whether specific actions already hooked to the given route pattern.

Route::contain($id = null, $stack = null | $fn = null, $fail = false);

Example:

Check whether my_route_hook_fn already hooked to the blog/%s% route:

if (Route::contain('blog/%s%', 'my_route_hook_fn')) { … }