list trips

add, remove flights
This commit is contained in:
Richard Morgan
2017-05-14 20:57:30 -04:00
parent 37d345840b
commit 09fa83af8b
16 changed files with 426 additions and 4 deletions

11
database/seeds/DatabaseSeeder.php Normal file → Executable file
View File

@@ -12,5 +12,16 @@ class DatabaseSeeder extends Seeder
public function run()
{
// $this->call('UsersTableSeeder');
factory(App\Libraries\Trips\Models\Trips::class, 5)
->create()
->each(function ($trip) {
$flights = factory(App\Libraries\Trips\Models\Flights::class, 2)
->create()
->each(function ($flight) use ($trip) {
$trip->flights()->attach($flight->id);
});
});
}
}