Skip to content

Commit

Permalink
fix: allow User model instantiation with new User(['id' => $id])
Browse files Browse the repository at this point in the history
We use this syntax for sending notifications without requerying the database. Also, we don't use $request->all() for anything user-related anymore so we should be safe to allow all attributes to be mass filled.
  • Loading branch information
Roardom committed Feb 26, 2025
1 parent 51937c8 commit b87638e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class User extends Authenticatable implements MustVerifyEmail
*
* @var string[]
*/
protected $guarded = ['id', 'created_at', 'updated_at'];
protected $guarded = [];

/**
* Get the attributes that should be cast.
Expand Down

0 comments on commit b87638e

Please sign in to comment.