DEV Community

Discussion on: Be careful with big increments with Laravel 6 and 7.

Collapse
 
arielmejiadev profile image
Ariel Mejia

Hi, thanks for reading the post, first Laravel has the same releases every 6 months, since laravel 5 the framework has a lot of stability, so there is a pretty good chanse that your 95% of your code works on any laravel version, some changes to review:

  • auth command is not available by default anymore.
  • all the auth classes and feature are present by default
  • to implement the same auth scaffold just add the "laravel/iu" package its an official package it adds scaffolds for vue and react
  • the "Str" class is available but str() helper maybe not

Now its important to take the time to look the new features why you could want the 7 version?

  • Implicit route model binding, powerful feature to use route model binding with different columns by adding "{user:slug}" for example.

  • blade components this feature is really great to handle views like vuejs components, with some advantage, because it compiles from php server you can event create a custom html email component and it will send as one html there is no dom js magic in this case a very powerful feature because you choose when use js components or when use blade components, additionally it has a command to create a class like "view-presenter" to handle data for this particular component, so you dont have to add variables to pass every time you want to return a view with this component.

  • Maybe the other great feature that is really helpful is the new Http class, its a guzzle wrapper but it has a lot of methods that makes easy to make a request and handle responses, status codes, json formats etc.

maybe since Laravel 5.5 this version 7 are the most cool versions, remember the only thing that change is the semantic version, but the changes are relatively minimum, if you has a large app that you need to update you has a guide in laravel docs before do the composer update command, to update the whole project, if you want a more automated tool in the market exists "Laravel shift"a company that use an API from your server provider or github to update automatically your project, this is helpful in scenarios that you have a very old version like Laravel 5.0 and you want to update it to 7, its a paid tool but it saves you weeks in just a few minutes