<?php

use Illuminate\Database\Seeder;
use App\Album;
use App\Gallery;
use Faker\Factory;
class AlbumTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker = Factory::create();
        $album = Album::create([
        	'name' => 'Landscape'
        ]);
        foreach (range(1, 6) as $i) {
        	Gallery::create([
        		'album_id' => $album->id,
        		'order' => $i,
        		'path' => $i.'.jpg',
        		'caption:id' => $faker->sentence(),
        		'caption:en' => $faker->sentence(),
        	]);
        }
    }
}
