Solution: Create a View to Display the HTTP Request Method
Explore how to create a view in AdonisJs that dynamically displays the HTTP request method. Learn to bind routes to controller functions and use the request object in Edge templates to access request details.
We'll cover the following...
We'll cover the following...
Solution
The following is ...
'use strict'
class TestController {
//Extracting the view class of the HTTP context
myview({ view }) {
return view.render('myview')
}
}
module.exports = TestControllerPress Run and wait for the ...