<?php

use Illuminate\Database\Seeder;

class AddReservationSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $reNo = 199;
        foreach (\App\User::where('role', 'user')->cursor() as $user) {
            foreach (\App\Hotel::cursor() as $hall) {
                $reNo++;
                factory(\App\Reservation::class, 10)->create(
                    [
                        're_no' => $reNo,
                        're_way' => $hall->reservation_way,
                        'user_id' => $user->id,
                        'provider_id' => $hall->provider->id,
                        'hall_id' => $hall->id,

                    ]
                );
            }
        }
    }
}
