I am about to step the paddle for the major release of Adonisjs version 4.0 (called dawn).
Dawn will be released with lots of exciting features including first class support for async/await, testing, tooling for deployment and bunch of 🚀 features.
This post is about the features you can use today in Adonisjs. Today I have released v3.2.1 which is ideally a small release but has lot more to offer.
Latest release of lucid ships with powerful features to filter data based upon relationships.
Fetch users with alteast one post
Let’s say we want to fetch all users who have contributed alteast one post.
const User = use('App/Model/User') yield User.query().has('posts', '>=', 1).fetch()
has() method will filter out all records from the parent model, if child models doesn’t satisfy a rule.
Checkout official documentation for all available methods.
Get comments count for each post
A common use case is to display the count of comments a post has received on posts listing page.
Each post will have an additional attribute called
Error Reporting For Neat Kids
Newer release of Youch has lots of exciting features focusing to improve your productivity when developing web apps.
- Pretty design;
- It only shows stack traces of your code and eliminates all native stack traces, as they only create noise;
- Optionally, you can click Show all frames to view frames for native code or npm modules;
- Displays important HTTP headers and cookies.
New Adonis CLI
@romainlanz rewrote adonis-cli from scratch using Ace. The more it looks pretty, the more it offers options to customize the installation process. Under the hood it allows:
- Choose between
yarnwhen installing dependencies;
- Make use of 3rd party templates by defining a
- Skip the modules installation process all together by passing
New Adonis Ally Drivers