6.8 - Reserving Individual Tickets

This commit is contained in:
Adam Wathan
2016-11-20 18:50:04 -05:00
parent 2b21f07aa2
commit c3c80722f5
6 changed files with 45 additions and 0 deletions

View File

@@ -51,3 +51,12 @@ $factory->state(App\Concert::class, 'unpublished', function ($faker) {
'published_at' => null,
];
});
$factory->define(App\Ticket::class, function (Faker\Generator $faker) {
return [
'concert_id' => function () {
return factory(App\Concert::class)->create()->id;
},
];
});

View File

@@ -17,6 +17,7 @@ class CreateTicketsTable extends Migration
$table->increments('id');
$table->unsignedInteger('concert_id');
$table->unsignedInteger('order_id')->nullable();
$table->datetime('reserved_at')->nullable();
$table->timestamps();
});
}