-
Notifications
You must be signed in to change notification settings - Fork 0
Routing
Niamul Hasan edited this page Jan 18, 2021
·
2 revisions
Defining routes
Route::set('signup', function () {
UserController::createView('Users/SignupView');
});
Route::get('user/$id/$postTitle', function ($params = array()) {
echo "user and then id-";
print_r($params); //Output: Array ( [id] => 342, [postTitle] => Title-of-a-post-from-browser-url )
});
You can get all the Parameters values in $params
array
Here, $params
array is an associative array with the keys named as you gave in the route URL (first parameter of the get
method)