In many cases, such as when using forms, some HTTP methods (e.g. PUT and DELETE) are not directly supported by browsers. To address this limitation, method-override allows us to use a supported HTTP method, such as POST, and override the original method in the application.
To use method-override, simply create a hidden field in the form with the name “_method” and the value being the method you want, for example:
<form method="POST" action="/resource">
<input type="hidden" name="_method" value="DELETE" />
<button type="submit">Delete resource</button>
</form>
We use Nunjucks as template engine. For more references about nunjucks, access the official documentation at https://mozilla.github.io/nunjucks/
Layouts, views, and partials must remain in their respective directories. Inside the resources directory we have layouts, views, partials and js. You can create folders inside these directories, but keep the .nj files inside these directories.