See: https://github.com/laravel/framework/pull/47309
# Laravel 11 Skeleton Overview
### General Notes
More environment variables have been added to the `.env.example` file.
The default `QUEUE_CONNECTION` variable value has been updated to `database` instead of `sync`.
The `BROADCAST_DRIVER` and `CACHE_DRIVER` environment variables have been renamed to `BROADCAST_CONNECTION` and `CACHE_STORE`, respectively.
The HTTP Kernel has been removed. Configuration that was previously done in this file can be done in the `bootstrap/app.php` file, including registering / replacing middleware.
The console kernel has been removed. Schedules can be defined in the console “routes” file. Commands generated by `make:command` are automatically loaded and do not require registration. Additional command loading paths can be registered in the `bootstrap/app.php` file.
The exception handler has been removed. Exception handling behavior can be configured in the `bootstrap/app.php` file via `reportable`, `renderable`, `throttle`, and more. Callbacks received by these functions will have their type hints inspected to see if they handle a given exception.
The base HTTP controller no longer extends any other classes (requiring new middleware definition feature). No traits are included by default on the base controller. Authorization can be done using facades, or traits can be added manually.
All middleware has been removed. Configuration of these middleware’s behavior can be done via static methods on the middleware themselves (see framework notes).
The `User` model now utilizes a `casts` method instead of a property. The `HasApiTokens` trait has been removed by default since Sanctum is not installed by default.
All service providers except the `AppServiceProvider` have been removed. Policies are auto-discovered and gates can be registered in `AppServiceProvider`. Likewise, events can be registered in `AppServiceProvider`. Routing behavior is now determined / customized in the `bootstrap/app.php` file.
New `bootstrap/app.php` file can be used to customize core framework behavior like routing, container bindings, middleware, and exception handling.
Sanctum is no longer installed by default (see `install:api`).
Configuration files are not present by default. Can be published by `config:publish` command. Default values are present in the framework and application level configuration now cascades with framework definitions, so only customized values need be present in application level configuration files.
Migration files have been re-dated to be evergreen. The `password_reset_tokens` table migration has been combined into the `users` table migration file. Likewise, the `jobs` table migration has been combined into a single migration with the `failed_jobs` table.
Echo bootstrapping has been removed by default. It is re-inserted by new `install:broadcasting` command.
API and channel routes files are not present by default, can be recreated by `install:api` and `install:broadcasting` respectively.
Per https://github.com/laravel/framework/pull/35588 , the term "schema" (a namespace) has been corrected to "search_path" (a list of namespaces), where appropriate, throughout the framework.
Accordingly, the `schema` configuration key should be changed to `search_path` to better reflect the fact that it may specify a _list_ of schemata (schemas), and not just a single schema. (In several Laravel versions prior to 9.0, the `schema` key could already specify more than one schema, but this fact was undocumented and non-obvious without examining the implementation carefully.)
As of Laravel 9.0, the `search_path` may specify any number of schemata, in any of the following formats:
'search_path' => 'public',
'search_path' => 'public,laravel',
'search_path' => ['public', '"laravel"', "'foobar'", '$bat'],
'search_path' => '\'public\', "laravel", "\'foobar\'", \'$bat\'',
'search_path' => '"$user", public',
Note that in the last example, the `$user` variable refers to PostgreSQL's special $user variable, as described in the Schema Documentation ( https://www.postgresql.org/docs/current/ddl-schemas.html ).
Note also that Laravel's default `search_path` value, 'public', is not necessarily the best choice for every use case. Developers should consult the "Usage Patterns" section of the aforementioned documentation before deciding how best to set the `search_path`, as it has security implications.
* Use phpredis as default Redis client
Follow up for https://github.com/laravel/framework/pull/29688
It's best that we already start using `phpredis` as a default to discourage usage of Predis.
* Update database.php
It was the only redis setting that wasn't overridable by an environment variable. It can help if you have multiple instances using the same `APP_NAME`, e.g. a staging instance
This enables the sqlite `foreign_key_constraints` option that was introduced with laravel/framework#26298 for all new installs.
The env variable DB_FOREIGN_KEYS was added to make it easier to handle this in testing (e.g. via phpunit.xml).
In https://github.com/laravel/laravel/pull/3641 was decided to use `127.0.0.1` instead of `localhost` to avoid DNS lookups
This change is to maintain consistency between `.env` and `database.php`
The commit 586bffa1d7 added support for sslmode in PostgresConnector.php and sslmode has been around since postgres version 9.1 (2011).
This change makes it possible to specify sslmode from the config file.
Also serves as documentation to other developers so they don't have to
dive deep into the code to figure out that it's posible to set this option.
The posible values for sslmode are:
disable, allow, prefer, require, verify-ca, verify-full
The default value is "prefer".
http://www.postgresql.org/docs/9.5/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION