What’s New in Laravel 5.7? Explore Updated Resources, Pagination & More

Laravel 5.7 has been officially released, bringing a revamped resources directory, a new pagination method to control link counts, improved Eloquent error messages, and ongoing bug and security fixes, with details on the updated folder layout and usage examples.

21CTO
21CTO
21CTO
What’s New in Laravel 5.7? Explore Updated Resources, Pagination & More

Laravel 5.7 version has been officially released, introducing several new features and fixing many bugs from 5.6.

New Resource Directory Structure

The resources directory no longer contains an assets sub‑directory; the previous assets sub‑folders have been moved under resources. The old structure was:

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

The updated structure in Laravel 5.7 is:

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

New Custom Pagination

Laravel 5.7 adds a new pagination method that lets you define the number of links displayed on each side of the current page, removing the need to edit pagination view templates. Example:

User::paginate(10)->linksOnEachSide(5);

Optimized Error Messages

Error messages that trace dynamic calls to Eloquent models are now simpler to understand.

Laravel 5.7 feature updates and bug fixes will be maintained until February 2019, with security fixes until August 2019. See the upgrade guide for migrating from 5.6 to 5.7.

Laravel is a clean, elegant PHP web framework that helps you escape messy code, build perfect web apps, and write expressive, concise code.

Source: oschina URL: http://www.oschina.net/news/99661/laravel-5-7-released
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Web DevelopmentPHPreleaseFrameworkLaravel
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.