我需要在我的子活动 ID 中按 ID 删除预订
Route::delete('event/{id}/booking/{id}', 'bookingController@destroy');
我的控制器
public function destroy($id) { booking::destroy($booking->id); return redirect('event')->with('flash_message', 'ลบข้อมูลการสำรองที่นั่งเรียบร้อย'); }
我的方法删除
<form method="POST" action="{{ url('event/' . $event->id .'/booking/' . $booking->id) }}" accept-charset="UTF-8" style="display:inline"> {{ method_field('DELETE') }} {{ csrf_field() }} <button type="submit" class="btn btn-danger btn-sm" title="Delete event" onclick="return confirm("Confirm delete?")"><i class="fa fa-trash-o" aria-hidden="true"></i>ยกเลิกการจอง</button> </form>
GCT1015
明月笑刀无情