Shift core files

This commit is contained in:
Shift
2024-02-16 21:13:07 +00:00
parent b943674881
commit ef25ec4f69
7 changed files with 115 additions and 122 deletions

View File

@@ -2,6 +2,7 @@
namespace Database\Factories;
use Illuminate\Support\Facades\Hash;
use App\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
@@ -13,12 +14,14 @@ class UserFactory extends Factory
*
* @return array
*/
protected static ?string $password;
public function definition()
{
return [
'username' => $this->faker->name(),
'email' => $this->faker->unique()->safeEmail(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'password' => static::$password ??= Hash::make('password'),
'public_front' => 1,
'remember_token' => Str::random(10),
];