mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-02-15 13:53:26 +00:00
(update database seeder)
This commit is contained in:
@@ -13,12 +13,13 @@ class DatabaseSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
factory(App\User::class)->create([
|
$user = factory(App\User::class)->create([
|
||||||
'email' => "adam@example.com",
|
'email' => "adam@example.com",
|
||||||
'password' => bcrypt('secret'),
|
'password' => bcrypt('secret'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(App\Concert::class)->states('published')->create([
|
factory(App\Concert::class)->states('published')->create([
|
||||||
|
'user_id' => $user->id,
|
||||||
'title' => "The Red Chord",
|
'title' => "The Red Chord",
|
||||||
'subtitle' => "with Animosity and Lethargy",
|
'subtitle' => "with Animosity and Lethargy",
|
||||||
'venue' => "The Mosh Pit",
|
'venue' => "The Mosh Pit",
|
||||||
@@ -26,9 +27,23 @@ class DatabaseSeeder extends Seeder
|
|||||||
'city' => "Laraville",
|
'city' => "Laraville",
|
||||||
'state' => "ON",
|
'state' => "ON",
|
||||||
'zip' => "17916",
|
'zip' => "17916",
|
||||||
'date' => Carbon::parse('2016-12-13 8:00pm'),
|
'date' => Carbon::parse('2017-09-13 8:00pm'),
|
||||||
'ticket_price' => 3250,
|
'ticket_price' => 3250,
|
||||||
'additional_information' => "This concert is 19+.",
|
'additional_information' => "This concert is 19+.",
|
||||||
])->addTickets(10);
|
])->addTickets(10);
|
||||||
|
|
||||||
|
factory(App\Concert::class)->create([
|
||||||
|
'user_id' => $user->id,
|
||||||
|
'title' => "Slayer",
|
||||||
|
'subtitle' => "with Forbidden and Testament",
|
||||||
|
'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,
|
||||||
|
'additional_information' => null,
|
||||||
|
])->addTickets(10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user