diff --git a/app/Http/Controllers/Consumables/ConsumableCheckoutController.php b/app/Http/Controllers/Consumables/ConsumableCheckoutController.php index 03ca2f2052..48cb6ac76a 100644 --- a/app/Http/Controllers/Consumables/ConsumableCheckoutController.php +++ b/app/Http/Controllers/Consumables/ConsumableCheckoutController.php @@ -56,7 +56,7 @@ class ConsumableCheckoutController extends Controller // Check if the user exists if (is_null($user = User::find($assigned_to))) { // Redirect to the consumable management page with error - return redirect()->route('checkout/consumable', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist')); + return redirect()->route('consumables.checkout.show', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist')); } // Update the consumable data diff --git a/resources/views/consumables/view.blade.php b/resources/views/consumables/view.blade.php index 958c0e1ee8..cacab8b267 100644 --- a/resources/views/consumables/view.blade.php +++ b/resources/views/consumables/view.blade.php @@ -127,7 +127,7 @@ @can('checkout', \App\Models\Consumable::class)
- numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }} + numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}
@endcan diff --git a/routes/web/consumables.php b/routes/web/consumables.php index 17e59df8aa..9f930a968c 100644 --- a/routes/web/consumables.php +++ b/routes/web/consumables.php @@ -9,12 +9,12 @@ Route::group(['prefix' => 'consumables', 'middleware' => ['auth']], function () Route::get( '{consumablesID}/checkout', [Consumables\ConsumableCheckoutController::class, 'create'] - )->name('checkout/consumable'); + )->name('consumables.checkout.show'); Route::post( '{consumablesID}/checkout', [Consumables\ConsumableCheckoutController::class, 'store'] - )->name('checkout/consumable'); + )->name('consumables.checkout.store'); });