mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
52 lines
1.5 KiB
PHP
52 lines
1.5 KiB
PHP
<?php
|
|
|
|
use App\Concert;
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
$user = factory(App\User::class)->create([
|
|
'email' => "adam@example.com",
|
|
'password' => bcrypt('secret'),
|
|
]);
|
|
|
|
\ConcertFactory::createPublished([
|
|
'user_id' => $user->id,
|
|
'title' => "The Red Chord",
|
|
'subtitle' => "with Animosity and Lethargy",
|
|
'additional_information' => "This concert is 19+.",
|
|
'venue' => "The Mosh Pit",
|
|
'venue_address' => "123 Example Lane",
|
|
'city' => "Laraville",
|
|
'state' => "ON",
|
|
'zip' => "17916",
|
|
'date' => Carbon::parse('2017-09-13 8:00pm'),
|
|
'ticket_price' => 3250,
|
|
'ticket_quantity' => 10,
|
|
]);
|
|
|
|
factory(App\Concert::class)->create([
|
|
'user_id' => $user->id,
|
|
'title' => "Slayer",
|
|
'subtitle' => "with Forbidden and Testament",
|
|
'additional_information' => null,
|
|
'venue' => "The Rock Pile",
|
|
'venue_address' => "55 Sample Blvd",
|
|
'city' => "Laraville",
|
|
'state' => "ON",
|
|
'zip' => "19276",
|
|
'date' => Carbon::parse('2017-10-05 7:00pm'),
|
|
'ticket_price' => 5500,
|
|
'ticket_quantity' => 10,
|
|
]);
|
|
}
|
|
}
|