Commit Graph

29 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
55af5469c3
[10.x] Uses PHP Native Type Declarations 🐘 (#6010)
* Adds basic typing around method's arguments and return types

* Adds missing `closure` type

* Adds typing on tests

* Fixes `RedirectIfAuthenticated`

* Fixes `Authenticate`

* Improves `RedirectIfAuthenticated` types

* Fixes user factory `unverified` return type
2023-01-03 10:35:24 +01:00
Nuno Maduro
8a62ca2633
Improves generic types on the skeleton (#5740) 2021-12-03 09:04:57 -06:00
Andrew Brown
38bc9119eb
type hint the middleware Request (#5438)
stemming from https://github.com/laravel/framework/pull/34224
2020-10-02 08:31:13 -05:00
Can Vural
94e7945517
Fix docblock for variadic parameter (#5401) 2020-09-09 07:20:20 -05:00
Mark van den Broek
7895cd3a5f
Update docblock (#5392) 2020-09-04 21:07:55 -05:00
Taylor Otwell
e265156bc6 simplify line 2020-07-14 15:12:37 -05:00
Muah
adb7eacf9e
[8.x] Multiple guards for RedirectIfAuthenticated (#5329)
* Update RedirectIfAuthenticated.php

allow the middleware to have the same behavior as https://laravel.com/api/5.8/Illuminate/Auth/Middleware/Authenticate.html#method_authenticate

so now the guest middleware have the same footprint as auth ex.`guest:web,admin` instead of creating multiple lines to support different guards.

* Update RedirectIfAuthenticated.php
2020-06-29 10:21:36 -05:00
Taylor Otwell
e0c4fd8b8a one line 2020-06-24 11:36:13 -05:00
Taylor Otwell
972f3cd283
DRY up path (#5173) 2019-12-10 08:59:27 -06:00
Taylor Otwell
44d274174f
Revert "[5.8] Modify RedirectIfAuthenticated middleware to accept multiple guards" 2019-02-24 18:51:07 -06:00
Taylor Otwell
247f7f9619
Update RedirectIfAuthenticated.php 2019-01-16 09:05:51 -06:00
Te7a-Houdini
bb79dda1ff Modify RedirectIfAuthenticated middleware to accept multiple guards 2019-01-14 17:47:22 +02:00
Taylor Otwell
24766d479d redirect to home if authed 2016-07-23 15:39:33 -05:00
Taylor Otwell
2ea2ae0f3f allow guard to be specified on middleaware 2015-12-05 21:56:17 -06:00
Taylor Otwell
a690bb7552 fix conflicts 2015-12-03 12:26:26 -06:00
Taylor Otwell
8414d45cdc update middleware and config 2015-12-03 12:25:38 -06:00
Martin Bean
223191a9b0 Change redirect when authenticated
The route /home doesn’t exist in a default Laravel application, whereas / does.
2015-11-19 23:01:29 +00:00
Graham Campbell
bf3785d0bc Additional cs fixes
Signed-off-by: Graham Campbell <graham@cachethq.io>
2015-06-01 15:46:45 +01:00
Taylor Otwell
8909e75552 Some spacing. 2015-03-02 15:31:27 -06:00
Taylor Otwell
c9c0380b34 Just use helper function in middleware. 2015-03-01 21:35:37 -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
caa166f5d6 Remove middleware interface. 2015-01-05 13:16:21 -06:00
Taylor Otwell
634c96d8d9 Rename dashboard to home. 2014-11-24 19:33:07 -06:00
Taylor Otwell
f8aeffc76a Tweak welcome view. 2014-11-24 11:47:49 -06:00
Taylor Otwell
ca2f02284c Rename middleware to more "action" words. 2014-11-11 12:51:55 -06:00