What’s New in Laravel 6.0 Release? (Laravel 6.0 Feature Upgrades)
As developers, our job is not only to create applications that work but also to give them support so that they can be maintained throughout their useful life. In the case of Laravel, major updates that bring new features, improvements and corrections are made every 6 months. However, updating a project developed in Laravel from one version to another is not as complicated as it seems. In this article, we will tell you what are the most important changes and the steps to update your application from Laravel version 5.8 to 6.0. Especially knowing that it will be an LTS version, that is, it will have support for corrections of security problems until September 2022.
Requirements
Before doing any update step, we must confirm that our application can be updated to Laravel 6.0 or not.
- The version of the application to be updated is Laravel 5.8. Otherwise, you must update it to that version. Take into account that Laravel 5.9 does not exist due to the changes made to the versioning of the framework.
- The production server and other environments must have PHP 7.2 or higher, as it is the new minimum requirement of Laravel 6.0 because PHP 7.1 will have active support until December 2019.
- Since Laravel 6.0 announced, all need to confirm that each of the third-party packages used in the application can work with Laravel 6.0? To do this you should check their official pages or repositories.
Recommendation
Use Git to avoid problems if something fails and you cannot solve, we recommend you create a new branch to update so that the code of your working project will be supported.
So, let’s start exploring what are those changes… and few are listed below:
- Default auth with ui:auth, make:auth Removed
- String and Array Default Functions Removed and Moved to Package
- Carbon 1.0 Removed and Supported 2.0
- Lazy Collection with New Cursor Method in Eloquent
- Primary Key Type Declaration in the Model
- BelongsTo::update Method Update in Eloquent
- Authorization Response
- Input Facade Removed Permanently
Let’s see all these new Laravel 6.0 Feature Upgrades one by one…