The latest version 5.8 brings with it a lot of features and updates that add to the functionalities of Laravel. aTeamIndia is already up to date on this. Their team is known to use the most recent and updated technologies for their projects. The new version has many improvements and is better than all the previous versions. Following are the features of the new version:
- Automatic Policy Resolution
Laravel has a great way of handling the authorisation of users. One way of doing this is through policies. Policies are basically classes that manage the logic around a particular resource. The previous versions require the policies to be registered in AuthService provider. However, with Laravel 5.8, the authorisation policy of a model or resource need not be manually registered. If the policy and the model follow standard Laravel naming rules, then Laravel will automatically discover it. The policy directory should also be in its default location for this purpose.
- Carbon 2.0 Support
Working with date and time is not always easy, especially when you are working with different time zones. Carbon provides a PHP’s date and time class that makes working with them easier. The new Laravel version supports this carbon package.
- HasOneThrough Eloquent Relationship
HasOneThrough is a new eloquent relationship that Laravel brings in its latest version. Even though this is found on other frameworks, Laravel makes use of it the best.
- Token Guard Token Hashing
Authentication and security are taken even more seriously with this version of Laravel. A unique thing about Laravel is the token guard for API authentication. This system has been improved by storing the tokens as SHA-256. This is secure than plain text tokens.
- Cache TTL
The new version has changed caching to seconds as compared to minutes in the previous versions. This is to make the setting of expiration time when storing items more precise. This also follows the catching library convention.
- Scheduler Timezone Configuration
With this new version, timezone can also be configured. This is very purposeful for scheduled tasks. The previous system had a cumbersome arrangement where you have to set the timezone for every scheduled task. But here, all that is required is defining the method of scheduledtimezone.
- Artisan Call Improvements
The previous version did not have the provision to allow artisan commands. But the new version lets you make this come using the artisan call method. Options can also be passed in a single string rather than an array of options.
- Artisan Serve Improvements
Artisan serve is one way in which you can serve your application in no time. Running the command php artisan serve will execute the same. In previous versions, this process used to run as default. Hence, the same command could not be used to serve another application. The new version lets you serve many applications with the same command at the same time. This quickens the application serving process for Laravel.
Thus, the new version comes with many useful updates and features and is an improved version of the old Laravel.