wip
This commit is contained in:
@@ -87,8 +87,10 @@ class OrderController extends Controller
|
|||||||
* @param int $id
|
* @param int $id
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy(Order $order)
|
||||||
{
|
{
|
||||||
|
$order->delete();
|
||||||
|
|
||||||
return response()->rest();
|
return response()->rest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ class SendOrderCreatedNotification implements ShouldQueue
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// $this->sendSMSToClient($event->order);
|
$this->sendSMSToClient($event->order);
|
||||||
// $this->sendSMSToStaff($event->order);
|
$this->sendSMSToStaff($event->order);
|
||||||
// $this->sendSMSToVendors($event->order);
|
// $this->sendSMSToVendors($event->order);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,13 +99,13 @@ class SendOrderCreatedNotification implements ShouldQueue
|
|||||||
Log::channel('order_sms_notification_sent_activity')
|
Log::channel('order_sms_notification_sent_activity')
|
||||||
->info(sprintf('SMS_SENT_FOR_ORDER[id, phone]: %s, %s', $order->id, orderAdminNumber()));
|
->info(sprintf('SMS_SENT_FOR_ORDER[id, phone]: %s, %s', $order->id, orderAdminNumber()));
|
||||||
|
|
||||||
User::where('phone_number', orderAdminNumber())->first()->notify(
|
// User::where('phone_number', orderAdminNumber())->first()->notify(
|
||||||
NovaNotification::make()
|
// NovaNotification::make()
|
||||||
->message('Täze sargyt.')
|
// ->message('Täze sargyt.')
|
||||||
->action('Gör', sprintf('/turkmenpostadmin/resources/orders/%s', $order->id))
|
// ->action('Gör', sprintf('/turkmenpostadmin/resources/orders/%s', $order->id))
|
||||||
->icon('download')
|
// ->icon('download')
|
||||||
->type('info')
|
// ->type('info')
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,5 +123,5 @@ Route::middleware(['auth:sanctum', 'banned'])->group(function () {
|
|||||||
Route::get('orders', [OrderController::class, 'index']);
|
Route::get('orders', [OrderController::class, 'index']);
|
||||||
Route::get('orders/{order}', [OrderController::class, 'show'])->where(['order' => '[0-9]+']);
|
Route::get('orders/{order}', [OrderController::class, 'show'])->where(['order' => '[0-9]+']);
|
||||||
Route::post('orders', [OrderController::class, 'store']);
|
Route::post('orders', [OrderController::class, 'store']);
|
||||||
Route::delete('orders/{order}', [OrderController::class, 'delete'])->where(['order' => '[0-9]+']);
|
Route::delete('orders/{order}', [OrderController::class, 'destroy'])->where(['order' => '[0-9]+']);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user