Laravel 11 – Overview of changes Part 2

Welcome to the next part of Laravel 11 – Overview of changes.

New directory structure

One of the main changes in the 11 version is a thorough update of the project’s directories. The project has been slimmed down by removing many files, including middleware from the app folder, eliminating API and broadcast routes from the project.

Laravel 10

Laravel 11

Introduction of Dumpable trait

In Laravel 11, we received a new trait designed to support code debugging. The Dumpable trait will allow us to use the methods dump() and dd() in method chaining. We can use it both in models and in helpers that support method chaining, which is utilized by this trait.

//Dump result
Shop::all()->dump();


//Die and dump result
Shop::all()->dd();

Saving previous keys

A new environment variable APP_PREVIOUS_KEYS has been added, which stores the old application keys. This is intended to ensure backward compatibility with data encrypted prior to the key change. As a result, re-encryption should proceed smoothly after changing the key.