mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-23 14:24:17 +00:00
clear test user data
This commit is contained in:
+3
-4
@@ -19,11 +19,10 @@ 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){
|
||||
dd($booking->invoice->pluck('id'));
|
||||
if($booking->invoice){
|
||||
$booking->invoice->invoiceDetails->delete();
|
||||
$booking->invoice->invoiceStatuses->delete();
|
||||
$booking->invoice->delete();
|
||||
InvoiceStatuses::where('invoice_id', $booking->invoice->id)->delete();
|
||||
\App\InvoiceDetails::where('invoice_id', $booking->invoice->id)->delete();
|
||||
\App\Invoice::find($booking->invoice->id)->delete();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user