database/factories/AdminFactory.php
/**
     * Define the model's default state.
     *
     * @return array
     */
Define the model's default state.
@return array
Define the model ' s default state . @return array
#[ArrayShape(['user_id' => "mixed", 'role' => "\App\Enums\Admin"])]
    public function definition(): array
    {
        return [
            'user_id' => (new User)->first()->id,
            'role' => Admin::Root,
        ];
    }
#[ ArrayShape ( [ 'user_id' => " mixed " , 'role' => " \App\Enums\Admin " ] ) ] public function definition ( ) : array { return [ 'user_id' => ( new User ) -> first ( ) -> id , 'role' => Admin :: Root , ] ; }
Define the model's default state.
Define the model ' s default state .