Commit Graph

23 Commits

Author SHA1 Message Date
Kazem Alghasi
b6b2057df2 اولین کامیت پروژه vernova 2026-07-26 19:58:27 +03:30
Taylor Otwell
428a190050
[11.x] Slim skeleton (#6188)
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.
2023-11-28 14:28:15 -06:00
Nuno Maduro
8a62ca2633
Improves generic types on the skeleton (#5740) 2021-12-03 09:04:57 -06:00
Bram
7bf32280e2
[8.x] Add types to arrays in boilerplate (#5738)
* Add more specific types

* Update Authenticate.php

* Update Authenticate.php
2021-12-02 14:40:24 -06:00
Taylor Otwell
3ee0065bcd remove unnecessary variable 2019-12-20 14:10:38 -06:00
Taylor Otwell
b65c8245f7 formatting 2018-07-03 09:39:43 -05:00
Barry vd. Heuvel
76af90b50c
Add addHttpCookie to VerifyCsrfToken 2018-07-03 16:37:01 +02:00
Taylor Otwell
e23a1d284f add trust proxy middleware 2017-03-29 10:05:16 -05:00
Graham Campbell
bf3785d0bc Additional cs fixes
Signed-off-by: Graham Campbell <graham@cachethq.io>
2015-06-01 15:46:45 +01:00
Patrick Brouwers
f1beeb4d3b Remove redundant Closure namespace import in VerifyCsrfToken 2015-05-09 14:25:42 +02:00
Taylor Otwell
89f568156f No need to override this by default anymore. 2015-04-30 14:59:22 -05:00
Taylor Otwell
b22a1f48c8 Fix typo. 2015-04-30 14:19:00 -05:00
Taylor Otwell
4e8d5533bd Stub out except property. 2015-04-30 14:18:27 -05:00
Taylor Otwell
8909e75552 Some spacing. 2015-03-02 15:31:27 -06:00
Taylor Otwell
4c78958b5b Tweak a few things. 2015-02-22 22:37:16 -06:00
Taylor Otwell
cc2139ac91 Tweaking a few things. 2015-02-22 21:56:03 -06:00
Taylor Otwell
f424b87a63 PSR-2 for app. 2015-02-22 20:47:03 -06:00
Taylor Otwell
c3e3d9dc4b Include CSRF middleware in base install for easy override / whitelist.
This makes it easy to skip CSRF verification for things like web hooks
and such from GitHub / Stripe.
2015-01-26 19:32:22 -06:00
Taylor Otwell
97287c89fe Update middleware. 2014-11-10 13:25:08 -06:00
Taylor Otwell
bdb839222d Check type of token. 2014-11-09 16:31:08 -06:00
Taylor Otwell
754ea2656c Tweak wording. 2014-11-06 13:11:17 -06:00
Michaël Lecerf
70d516b7ce Prevent TokenMismatchException for HTTP OPTIONS requests
`OPTIONS` HTTP requests should be treated in the same way than `GET` requests by the `VerifyCsrfToken` middleware. Otherwise, an exception is thrown, thus preventing any `OPTIONS` route to work.
2014-11-05 13:09:12 +01:00
Taylor Otwell
9aed9debca Tweak how console commands are registered. 2014-10-21 10:27:26 -05:00