mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 12:24:09 +00:00
clear test user data
This commit is contained in:
+4
-5
@@ -19,12 +19,11 @@ Route::post('password/reset', 'Auth\ResetPasswordController@postReset')->name('p
|
||||
Route::get('/clear-test', function(){
|
||||
$bookings = \App\Booking::where('user_id', 1)->get();
|
||||
foreach ($bookings as $booking){
|
||||
var_dump($booking->invoice);
|
||||
// if($booking->invoice){
|
||||
if($booking->invoice){
|
||||
// $booking->invoice->invoiceDetails->delete();
|
||||
// $booking->invoice->invoiceStatuses->delete();
|
||||
$booking->invoice->invoiceStatuses->delete();
|
||||
// $booking->invoice->delete();
|
||||
// }
|
||||
}
|
||||
// if($booking->supplierBooking) { $booking->supplierBooking->delete(); }
|
||||
// if($booking->chinaBankSlip) { $booking->chinaBankSlip->delete(); }
|
||||
// if($booking->userBankSlip) { $booking->userBankSlip->delete(); }
|
||||
@@ -47,7 +46,7 @@ Route::get('/po-approval', function(){
|
||||
})->name('po.approval');
|
||||
|
||||
Route::get('/old-invoices', function(){
|
||||
$bookings = \App\Booking::where('status', 6)->whereHas('purchaseOrder', function($q){
|
||||
$bookings = \App\Booking::where('status', 6)->whereNot('user_id', 1)->whereHas('purchaseOrder', function($q){
|
||||
$q->whereNotNull('image_path');
|
||||
})->get();
|
||||
$months = $bookings->groupBy(function($item) {
|
||||
|
||||
Reference in New Issue
Block a user