Laravel 5.7 is now released! What's New in Laravel 5.7

What's New in Laravel 5.7. Laravel's versioning scheme maintains the following convention: paradigm.major.minor. Major framework releases are released every six months (February and August), while minor releases may be released as often as every week. Minor releases should never contain breaking changes.

Laravel 5.7 is now released and available to everyone. This release introduces several new features and many bug fixes and improvements over Laravel 5.6. Some of the new features include:

Laravel 5.7 Resources Directory Changes

Taylor Otwell announced that in Laravel 5.7 the resources directory will be flattened instead of having an assets folder:

Laravel 5.6’s resources directory looks like this:

resources
├── assets
│   ├── js
│   └── sass
├── lang
│   └── en
└── views

And the upcoming resources directory will look like the following in Laravel 5.7:

resources
├── js
├── lang
├── sass
└── views

Laravel 5.7 Callable Action URLs

A new callable-like syntax for action URLs is coming to Laravel 5.7 thanks to Sebastian De Deyne! You might also hear this feature called “tuple notation” or a “callable array syntax” for URL generation actions.

Here’s how it works starting in 5.7:
$url = action([PostsController::class, 'index']);

Currently (as of Laravel 5.6) the action helper only supports the following style that you’re probably already familiar with:
$url = action('UserController@profile', ['id' => 1]);

One benefit of the new callable array syntax format is the ability to navigate to directly to the controller if you use a text editor or IDE that supports code navigation.

You can find it in the upcoming documentation for URL Generation, and if you’re interested in the code changes made to support this feature, you can check out the 5.7 Tuple notation for UrlGenerator actions pull request.

Laravel Dump Server to Ship With Laravel 5.7

At Laracon US 2018 Taylor Otwell announced that Laravel Dump Server would come packaged with Laravel in version 5.7! It will be a development dependency in laravel/laravel composer file.

Starting in Laravel 5.7 you’ll get this command out-of-the-box that allows you to dump data to the console or an HTML file instead of to the browser:
php artisan dump-server

# Or send the output to an HTML file
php artisan dump-server --format=html > dump.html

The command runs a server in the background that collects data sent from the application that sends the output through the console. When the command is not running in the foreground, the dump() function works as expected by default.

Laravel 5.7 Improved Error Messages for Dynamic Calls

Laravel 5.7 makes it easier than ever to track down error messages caused by dynamic calls to Eloquent models (and other parts of the framework) thanks to Bouncer developer Joseph Silber!

You’ll get a more clear picture of the error caused by a missing method instead of a possibly confusing error on the underlying object:

Laravel 5.7: New Pagination Link Customizations

Laravel 5.7 has a new pagination method to customize the number of links on each side of the paginator. Thanks to the new method you no longer need a custom pagination view in some cases. Here’s the API you can use to define the link count on each side of the current page:
User::paginate(10)->onEachSide(5);

Laravel 5.7 Guest User Gates

In Laravel 5.6 and below authorization gates and policies automatically return false for unauthenticated users. New in Laravel 5.7, you can now allow guests to go through authorization checks by using a nullable type-hint or setting the default value as null:
Gate::define('view-post', function (?User $user) {
    // Guests 
});

By using a nullable type hint the $user variable will be null when a guest user is passed to the gate, and you can then make decisions about authorizing the action. If you allow nullable types and return true, then the guest will have authorization.

If you don’t use a nullable type hint, guests will automatically get this beautiful 403 response for Laravel 5.7, designed by Steve Schoger (@steveschoger):


Follow our social media and see you next lessons ..

COMMENTS

Next Recomended


Feel free to code it up and send us a pull request.

Hi everyone, let's me know how much this lesson can help your work. Please Subscribe and Follow Our Social Media 'kodeajaib[dot]com' to get Latest tutorials and will be send to your email everyday for free!, Just hit a comment if you have confused. Nice to meet you and Happy coding :) all ^^



Follow by E-Mail


Name

ADO.NET,3,Ajax,6,Android,9,AngularJS,4,ASP.NET,4,Blogger Tutorials,7,Bootstrap,7,C++,1,Codeigniter,2,Cplusplus,6,Crystal Report,6,CSharp,25,Ebook Java,2,FlyExam,1,FSharp,3,Game Development,2,Java,35,JDBC,2,Laravel,84,Lumen,2,MariaDB,2,Ms Access,3,MySQL,31,ODBC,6,OleDB,1,PHP,14,PHP Framework,5,PHP MYSQLI,9,PHP OOP,5,Python,8,Python 3,4,SQL Server,4,SQLite,4,Uncategorized,5,Vb 6,2,Vb.Net,89,Video,48,Vue Js,4,WPF,2,Yii,3,
ltr
item
KODE AJAIB: Laravel 5.7 is now released! What's New in Laravel 5.7
Laravel 5.7 is now released! What's New in Laravel 5.7
What's New in Laravel 5.7. Laravel's versioning scheme maintains the following convention: paradigm.major.minor. Major framework releases are released every six months (February and August), while minor releases may be released as often as every week. Minor releases should never contain breaking changes.
https://2.bp.blogspot.com/-2YkkgedhYZM/W7owD6FRmoI/AAAAAAAAEtg/M7pXiZThjVICl9YRzr9vfiRySDslVb2nQCLcBGAs/s320/laravel-5.7-callable-action-urls.png
https://2.bp.blogspot.com/-2YkkgedhYZM/W7owD6FRmoI/AAAAAAAAEtg/M7pXiZThjVICl9YRzr9vfiRySDslVb2nQCLcBGAs/s72-c/laravel-5.7-callable-action-urls.png
KODE AJAIB
https://www.kodeajaib.com/2018/10/laravel-57-whats-new-in-laravel-57.html
https://www.kodeajaib.com/
https://www.kodeajaib.com/
https://www.kodeajaib.com/2018/10/laravel-57-whats-new-in-laravel-57.html
true
3214704946184383982
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy