12 Commits

Author SHA1 Message Date
Pavel
8b67958f49
Narrow down array types (#6497) 2024-11-21 08:54:46 -06:00
Taylor Otwell
2eacb3d0f0 wip 2024-11-18 08:18:44 -06:00
Andrew Brown
3b146114e2
match HidesAttributes docblocks (#6495)
the docblock in `HidesAttributes` was updated in #42512, so this child class should be using the same.

otherwise PHPStan throws a "PHPDoc type array<int, string> of property App\Models\User::$hidden is not covariant with PHPDoc type list<string> of  property Illuminate\Database\Eloquent\Model::$hidden" error
2024-11-18 08:18:13 -06:00
Punyapal Shah
c9c8fb9ee7
Refactor User model to use HasFactory trait and add type hint for UserFactory (#6453) 2024-09-19 06:22:19 -05:00
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
Eliezer Margareten
7e0a2db2e0
Add hashed cast to user password (#6171)
* Add `hashed` cast to user password

* Update composer.json
2023-05-10 13:51:00 -05:00
Nuno Maduro
fa5e54a2ab
[9.x] Uses laravel/pint for styling (#5945)
* Uses `laravel/pint` for styling

* Makes `.styleci.yml` ignored on export

* Update composer.json

Co-authored-by: Dries Vints <dries@vints.io>
2022-07-15 08:38:49 -05:00
Nuno Maduro
8a62ca2633
Improves generic types on the skeleton (#5740) 2021-12-03 09:04:57 -06:00
Maarten Buis
7c99346801
[8.x] Use PHPDoc comments from base class in User model (#5676)
* Use phpdoc comments from Model class

* Update User.php
2021-08-23 08:47:37 -05:00
Taylor Otwell
226d1bfc3c
[8.x] Sanctum (#5663)
* initial sanctum poc

* add files

* remove token
2021-08-11 13:44:34 -05:00
Alex Mayer
f1a51f7c62
[8.x] Update User Model to Match Jetstream Formatting (#5422)
* Update User Model to Match Jetstream Formatting

* Update User.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
2020-09-20 20:35:48 -05:00
Taylor Otwell
710d472d76 models directory 2020-08-20 15:31:07 -05:00