fix+add: seats + seat-chooser
This commit is contained in:
parent
2c6745e812
commit
b0cc5b5278
31 changed files with 808 additions and 115 deletions
|
@ -17,3 +17,28 @@ use Illuminate\Support\Facades\Route;
|
|||
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
|
||||
// /api/cinemas/{id}/rooms
|
||||
Route::get('/cinemas/{id}/rooms', function ($id) {
|
||||
$cinema = (new App\Models\Cinema)->find($id);
|
||||
return $cinema->rooms;
|
||||
});
|
||||
|
||||
// /api/showings/{id}
|
||||
Route::get('/showings/{id}', function ($id) {
|
||||
$showing = (new App\Models\Showing)->find($id);
|
||||
return $showing;
|
||||
});
|
||||
|
||||
|
||||
// /api/rooms/{id}/seatMatrix
|
||||
Route::get('/rooms/{id}/seatMatrix', function ($id) {
|
||||
$room = (new App\Models\Room)->find($id);
|
||||
return $room->seatMatrix();
|
||||
});
|
||||
|
||||
// /api/showings/{id}/seatMatrix
|
||||
Route::get('/showings/{id}/seatMatrix', function ($id) {
|
||||
$showing = (new App\Models\Showing)->find($id);
|
||||
return $showing->seatMatrix();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue