Started refactoring for toor_rooms
This commit is contained in:
parent
c5d5818334
commit
964411a89d
4 changed files with 16 additions and 4 deletions
|
|
@ -249,6 +249,11 @@ class TourController extends Controller
|
|||
}
|
||||
|
||||
|
||||
public function create_room($tour_id, $capacity) {
|
||||
DB::delete("INSERT INTO booking_rooms")
|
||||
}
|
||||
|
||||
|
||||
public function upload_gallery(Request $request, Tour $tour){
|
||||
dd($request);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateBookingRooms extends Migration
|
||||
class CreateTourRooms extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
|
|
@ -13,7 +13,7 @@ class CreateBookingRooms extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('booking_rooms', function (Blueprint $table) {
|
||||
Schema::create('tour_rooms', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->integer('tour_id');
|
||||
|
|
@ -25,7 +25,7 @@ class CreateBookingRooms extends Migration
|
|||
$table->integer('room_id')->after('user_id');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -107,7 +107,13 @@
|
|||
@endforeach
|
||||
</ul>
|
||||
<div class="card-header">
|
||||
<button type="submit" class="btn">+ Raum hinzufügen</button>
|
||||
<a href="/tour/{{$tour->id}}/create_room/1" class="text-primary">+ Einzelzimmer</a>
|
||||
<!-- <button type="submit" class="btn">+ Einzelzimmer</button> -->
|
||||
</div>
|
||||
|
||||
<div class="card-header">
|
||||
<a href="/tour/{{$tour->id}}/create_room/2" class="text-primary">+ Doppelzimmer</a>
|
||||
<!-- <button type="submit" class="btn">+ Doppelzimmer</button> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ Route::resource('/tour', TourController::class)->middleware('auth');
|
|||
Route::get('/tour/{tour_id}/join', 'TourController@join')->middleware('auth');
|
||||
Route::get('/tour/{tour_id}/cancelBooking', 'TourController@cancelBooking')->middleware('auth');
|
||||
Route::get('/tour/{tour_id}/cancelBookingAdmin/{user_id}', 'TourController@cancelBookingAdmin')->middleware('auth');
|
||||
Route::get('/tour/{tour_id}/create_room/{capacity}', 'TourController@create_room')->middleware('auth');
|
||||
|
||||
Route::get('/img_storage/{category}/{imageName}','ImageController@getImage'); // no middleware auth needed, its checked in Controller
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue