megacommit
This commit is contained in:
		
							parent
							
								
									2451ab45cb
								
							
						
					
					
						commit
						34ed81516b
					
				
					 51 changed files with 1200 additions and 251 deletions
				
			
		|  | @ -23,17 +23,14 @@ class RoomSeeder extends Seeder | |||
|                 ], | ||||
|                 [ | ||||
|                     'room_name' => 'Room 2', | ||||
|                     'room_rows' => 10, | ||||
|                     'room_columns' => 10, | ||||
|                     'room_rows' => 5, | ||||
|                     'room_columns' => 5, | ||||
|                 ], | ||||
|                 [ | ||||
|                     'room_name' => 'Room 3', | ||||
|                     'room_rows' => 10, | ||||
|                     'room_columns' => 10, | ||||
|                 ], | ||||
|                 ]; | ||||
|             ]; | ||||
| 
 | ||||
|             foreach ($rooms as $room) { | ||||
|                 $this->command->info("Creating room {$room['room_name']} for cinema {$cinema->cinema_name}"); | ||||
| 
 | ||||
|                 $r = new \App\Models\Room(); | ||||
|                 $r->room_name = $room['room_name']; | ||||
|                 $r->room_rows = $room['room_rows']; | ||||
|  | @ -43,6 +40,7 @@ class RoomSeeder extends Seeder | |||
|                 $r->save(); | ||||
| 
 | ||||
|                 for ($row = 1; $row <= $r->room_rows; $row++) { | ||||
|                     $this->command->info("Creating row {$row} for room {$r->room_name}"); | ||||
|                     for ($column = 1; $column <= $r->room_columns; $column++) { | ||||
|                         $s = new \App\Models\Seat(); | ||||
|                         $s->seat_row = $row; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue