*/ public function definition(): array { return [ 'name' => $this->faker->name, 'email' => $this->faker->email, 'password' => Hash::make('secret'), 'is_admin' => false, 'preferences' => [ 'lastfm_session_key' => Str::random(), ], 'remember_token' => Str::random(10), ]; } public function admin(): self { return $this->state(function (): array { // phpcs:ignore return ['is_admin' => true]; }); } }