I am absolutely novice with Laravel and I am currently learning the routes feature of the Framework.
I want to know if it is possible to do like we can do with ASP.NET that is to redirect to a Controller written in the URL.
Actually, to do something like:
<?php
Route::get('/{CustomController}/{Action}', function ($controller, $action) {
return controller($controller, $action);
});
Where CustomController
is the controller which will run the request to the view Action
With ASP.NET Core, it is something like:
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}");
});