What's New In Laravel 5.7 ?

laravel-5.7.jpg

Baymediasoft Blog

Jan 14, 2019

What's New In Laravel 5.7 ?

Laravel 5.7 along with improvements has some better enhancements and bug fixes. This version of laravel continues the improvements introducing several new features along with the launch of Laravel Nova. Hence, in this article, we will be covering all the interesting and new features introduced by laravel 5.7.

 

  1. Laravel Nova

Taylor Otwell released the project laravel Nova. Though it is not a feature of laravel, it is a different package that is beautifully designed for the admin dashboard panel for laravel. The main feature of this panel is the ability to administer the underlying database records using Eloquent. It also has various additional features as well mainly comprising of- support for filters, lenses, actions, queued actions, metrics, authorization, custom tools, custom cards, custom fields, and many more.

 

 

  1. Improved Testing For Artisan Commands

Laravel 5.7 has improved its approach to test artisan commands. Laravel 5.7 now makes it possible to test console applications accepting inputs. Three methods are used for testing console applications:

  • expectQuestion.
  • expectsOutput.
  • assertExitCode.

 

  1. Email Verification

With the newly launched Laravel 5.7, it provides a feature for email verification.

To include this feature, an "email_verified_at" timestamp column has to be added to the default users table migration that is included with the structure.

To assist newly registered users to verify their email, the "User" model should be marked with the "MustVerifyEmail" interface.

 

  1. Changed Resource Directory

In Laravel 5.7 the resources/assets have been flattened into resources, hence eliminating parent directory assets. 

 

  1. Callable Action URLs

With the new version of Laravel, now it starts supporting "callable array syntax" or "tuple notation" for controller action which will generate URLs.

Before 5.7

<?php

$url = action([UserController::class, 'index']);

 

After 5.7

<?php

$url = action('UserController@profile', ['id' => 1]);

 

  1. Improved Filesystem

Laravel 5.7 introduces two new methods for reading and writing streams in the filesystem. They are known as readStream and writeStream methods. 

Storage::disk('s3')->writeStream(

    'remote-file.zip',

    Storage::disk('local')->readStream('local-file.zip')

);

 

  1. Guest Policies/Gates

According to previous versions of Laravel authorization gates and policies return "false" for unauthenticated visitors to the application.

But with Laravel 5.7, you may allow guests to go through authorization checks by declaring an “optional” type-hint or supplying a "null" default value for the user argument definition.

Gate::define('modify-sheet', function (?User $user, Sheet $sheet) {

    // ...

});

 

Conclusion

In this article, we have looked at all the new and improved features of Laravel 5.7 along with the new product Laravel Nova which makes it a must-have for all the Laravel Development companies.

These features have added ease and flexibility to Laravel Development services as well giving it another reason for becoming a must-have. Hence, if you are looking for experienced Laravel Development Company to develop your dream project, you must consider Baymediasoft Technologies an optimum destinations who will convert your dream project into reality with their professional Laravel development Services.

 

 

 

 

 

Author
user-image-.png
James Smith

Super blogger

Be the first to comment!

Leave a comment

recent blogs

Checkout more of our Creative Writings

WordPress The Safest Platform For Entrep...

WordPress Is Self-possessed For Expected Growth As...

J

  • James Smith
  • |
  • 3 months ago
Wordpress Development Services

Creating Your Websites In WordPress Does Not Let Y...

J

  • James Smith
  • |
  • 3 months ago
Blockchain Technology

Blockchain Technology Is Winning Trust With Time....

S

  • Sheron Kelly
  • |
  • 4 months ago
Best WordPress Plugins For Performance O...

WordPress As A Stage Offers A Lot Of Choices For E...

J

  • James Smith
  • |
  • 6 months ago
Quick Steps To Add Header And Footer Cod...

Here We Will Be Discussing Two Methods By Which Yo...

J

  • James Smith
  • |
  • 7 months ago
A Quick Guide For Fixing 500 Internal Se...

This Internal Server Error Screen Surely Panics Ev...

K

  • Kathy Johnson
  • |
  • 7 months ago

clients

head quarter

development center

ping us!

let's get connected