<?php

use Illuminate\Database\Seeder;

class ReviewSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('reviews')->truncate();

        $relation = [
            ['facility_id'  =>  2462, 'r_photo'    =>  NULL, 'r_date'  =>  now(), 'r_name' =>  'test 1', 'r_title'    =>  'test 1', 'r_comment'    =>  'comment 1'],
            ['facility_id'  =>  2462, 'r_photo'    =>  NULL, 'r_date'  =>  now(), 'r_name' =>  'test 2', 'r_title'    =>  'test 2', 'r_comment'    =>  'comment 2'],
            ['facility_id'  =>  2462, 'r_photo'    =>  NULL, 'r_date'  =>  now(), 'r_name' =>  'test 3', 'r_title'    =>  'test 3', 'r_comment'    =>  'comment 3'],
            ['facility_id'  =>  2462, 'r_photo'    =>  NULL, 'r_date'  =>  now(), 'r_name' =>  'test 4', 'r_title'    =>  'test 4', 'r_comment'    =>  'comment 4'],
            ['facility_id'  =>  2462, 'r_photo'    =>  NULL, 'r_date'  =>  now(), 'r_name' =>  'test 5', 'r_title'    =>  'test 5', 'r_comment'    =>  'comment 5'],
            ['facility_id'  =>  2462, 'r_photo'    =>  NULL, 'r_date'  =>  now(), 'r_name' =>  'test 6', 'r_title'    =>  'test 6', 'r_comment'    =>  'comment 6']
        ];
        foreach ($relation as $data){
            \App\Models\Review::create($data);
        }
    }
}
