Did you know you can quickly and easily disable Tailwind's hover state classes on tap devices, like phones and tablets?
Bite Sized Code
With AdonisJS 6, layouts have been removed in favor of components. In this snippet, we provide a simple layout component example.
If your server is proxied by Cloudflare, chances are the built-in method to get the user IP Address in AdonisJS is returning Cloudflare's IP instead of your users. With this snippet, we'll fix that!
We can bind handlers to transaction events to easily defer specific actions until after the transaction has been committed and our changes have persisted to the database.
You can use route matchers to specify requirements on the route parameter. In this snippet, we require our username param to start with the @ character for the route to match.