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.
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
└── viewsThe updated structure in Laravel 5.7 is:
/resources
├── js
├── lang
├── sass
└── viewsNew 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
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
