forked from adampatterson/Tentacle
-
Notifications
You must be signed in to change notification settings - Fork 1
Route
Adam Patterson edited this page Dec 18, 2012
·
1 revision
Dingo has built in functions for accessing route data. The route class is always avaliable to use in your applications and does not have to be loaded.
Returns the loaded controller for the current route.
echo route::controller();
If you make the first argument true, then only the controller name will be returned. This only affects the result if your controller is placed in a sub-directory
.
echo route::controller(true);
####Method
Returns the loaded method for the current route.
echo route::method();
###Arguments
Returns the arguments passed to the loaded method for the current route.
$args = route::arguments();