Complete TP7 TP8 authentication authorization and classic CSS
This commit is contained in:
@@ -29,6 +29,7 @@ class UserFactory extends Factory
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'is_admin' => false,
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
@@ -42,4 +43,14 @@ class UserFactory extends Factory
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the user is an administrator.
|
||||
*/
|
||||
public function admin(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes): array => [
|
||||
'is_admin' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user