From 7ad56dad8d1d0a6b198a3e9c02620d406ad88485 Mon Sep 17 00:00:00 2001 From: SahrulGnwn Date: Thu, 11 Aug 2022 16:59:04 +0700 Subject: [PATCH] Fix Delete --- app/Http/Controllers/ServerController.php | 2 +- resources/views/servers/settings.blade.php | 33 +++++++++++++--------- routes/web.php | 1 - 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index b6a2f0c2..e5ead954 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -204,7 +204,7 @@ class ServerController extends Controller } /** Remove the specified resource from storage. */ - public function delete(Server $server) + public function destroy(Server $server) { try { $server->delete(); diff --git a/resources/views/servers/settings.blade.php b/resources/views/servers/settings.blade.php index 6e777e90..f7db9fd1 100644 --- a/resources/views/servers/settings.blade.php +++ b/resources/views/servers/settings.blade.php @@ -21,7 +21,7 @@ - +
@@ -104,7 +104,7 @@
- +
@@ -244,20 +244,21 @@

- @csrf - -
Once the Upgrade button is pressed, we will automatically deduct the amount for the first hour according to the new product from your credits.
+ @csrf + +
Once the Upgrade button is pressed, we will automatically deduct the amount for the first hour according to the new product from your credits.
+
@@ -282,7 +283,11 @@ @@ -300,4 +305,4 @@ -@endsection +@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 3999aeda..66160380 100644 --- a/routes/web.php +++ b/routes/web.php @@ -64,7 +64,6 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () { Route::resource('notifications', NotificationController::class); Route::resource('servers', ServerController::class); Route::post('servers/{server}/upgrade', [ServerController::class,'upgrade'])->name('servers.upgrade'); - Route::get('servers/{server}/delete', [ServerController::class,'delete'])->name('servers.delete'); Route::resource('profile', ProfileController::class); Route::resource('store', StoreController::class);