yield User.first()
yield User.last()
You are viewing the legacy version of AdonisJS. Visit https://adonisjs.com for newer docs. This version will receive security patches until the end of 2021.
AdonisJs is a combination of multiple npm packages called Service providers. All packages are free to have their own release cycle and versions. The combination of these packages form a release for AdonisJs. In brief you should look into the version number in package.json
file of your project to know the current version.
Release v3.2 is a minor update with handful or bug fixes and incremental API updates. All features/methods from v3.1 are fully supported and compatible with v3.2. Below is the changelog for individual modules.
There are no notable changes for this repo and all existing features from 3.1 will continue to work. Checkout the git changelog
Below is the list of notable changes:
Add support for updating and belongsToMany
pivot table and fetch additional columns using withPivot
method. Related commit
Model static interface now has first
and last
methods to pull first and last rows from a table related to a model. Related commit
yield User.first()
yield User.last()
Checkout the entire git chanagelog.
Below is the list of notable changes:
You can now pass custom object to the JWT token when generating it. It can be helpful to add some meta information to the token to be read on the client side. Related commit.
// Save custom payload
yield request.auth.generate(user, {
isAdmin: true
})
// Get custom payload
const payload = yield request.auth.getPayload()
Checkout the entire git changelog
There are no notable changes for this repo and all existing features from 3.1 will continue to work. Checkout the Checkout the entire git chanagelog.