Last updated
Last updated
Sometimes we do not need a controller to display a view we just need to define a callable parameter in our routes.
With this callable parameter we can do some logic in our routes or even query our database to fetch some data and then pass to our views.
We can also pass the route with a parameter and access it inside our callable parameter in our route.