T echnojs
Already have an account?
login Login


Don't have an account?
group_add Register

Showing suggestions...

Cookies Consent

This site uses cookies to offer you a better browsing experience.

What's New in Laravel 11: Streamlined Application

Laravel 11, released on March 12, 2024, brings several significant changes and new features: slim skeleton, optimized config files, and more.

Marked as March 12, 2024

Laravel 11 has arrived with a leaner and more efficient codebase, shedding approximately 69 files compared to its predecessor.

Let's summarize the main features and changes:

  • Slim Skeleton

    Laravel 11 introduces a more minimalistic application skeleton, with changes in the folder structure. Notable changes include the removal of folders like app/Console, app/Exceptions, and app/Http/Middleware. Changes have been made so that routes, middlewares, and exceptions are now registered in the bootstrap/app.php file.

  • Config Changes

    Several config files have been removed from the config/ folder, but you can manually publish them using the php artisan config:publish command. Additionally, some config values have been removed in favor of automation within the framework.

  • Welcome Page

    Laravel 11 with a new welcome page, featuring light and dark mode options which have vibrant backgrounds, clean icons, and four main sections/links for documentation, Laravel News, Laracasts, and prominent ecosystem links.

  • Casts Method

    Casts are now declared within the casts() method instead of the $casts property in models, offering improved organization and flexibility.

  • Artisan Commands

    Laravel 11 introduces a new make: artisan commands for creating enum, interface, trait, and class and providing more versatility in code generation.

  • Health Endpoint

    A new health check route, /up, is now registered in Laravel 11, offering insight into application response times.

  • Dumpable Trait

    A new Dumpable trait is introduced, designed to simplify code debugging by replacing traditional methods like dd() and dump().

  • Once() method

    Introduces a new memoization function called once() to ensure a callable is only called once.

  • Route Changes

    Laravel 11 does not include routes/api.php by default, and Sanctum isn't installed automatically. You can use php artisan install:api and php artisan install:broadcast commands to set up the API scaffolding and broadcasting.

  • APP_KEY Rotation

    Laravel 11 introduces graceful rotation so  APP_KEY that changes to the key do not disrupt database operations, mitigating the risk of data corruption.

  • Limit Eager Load

    Laravel 11 enables the native limiting of eagerly loaded records without the need for external packages, streamlining data retrieval processes.

  • Prompt Validation

    The integration of Prompt Validator brings user-friendly forms to command-line applications, boasting browser-like features such as placeholder text and validation support.

  • Minimum PHP 8.2

    Laravel 11 mandates a minimum PHP version of 8.2, dropping support for PHP 8.1.

question_answer Comments
bar_chart Views
people_alt Contributors
category Category workspaces Group
public Visibility
monetization_on Monetisation
checklist Authorization
save Created
today Updated

Any Question / Leave a comment ?
--- Thank you for your attention! ---

Related Posts