Skip to content

A free open source IT asset/license management system

Drop the with users on the create checkout screen

snipe9676d934d296
diff --git a/app/Http/Controllers/Consumables/ConsumableCheckoutController.php b/app/Http/Controllers/Consumables/ConsumableCheckoutController.php
index 919cd1698f..fd690fede8 100644
--- a/app/Http/Controllers/Consumables/ConsumableCheckoutController.php
+++ b/app/Http/Controllers/Consumables/ConsumableCheckoutController.php
@@ -4,12 +4,11 @@ namespace App\Http\Controllers\Consumables;
use App\Events\CheckoutableCheckedOut;
use App\Http\Controllers\Controller;
-use App\Models\Accessory;
use App\Models\Consumable;
use App\Models\User;
use Illuminate\Http\Request;
-use Illuminate\Support\Facades\Auth;
-use Illuminate\Support\Facades\Input;
+use \Illuminate\Contracts\View\View;
+use \Illuminate\Http\RedirectResponse;
class ConsumableCheckoutController extends Controller
{
@@ -20,13 +19,11 @@ class ConsumableCheckoutController extends Controller
* @see ConsumableCheckoutController::store() method that stores the data.
* @since [v1.0]
* @param int $id
- * @return \Illuminate\Contracts\View\View
- * @throws \Illuminate\Auth\Access\AuthorizationException
*/
- public function create($id)
+ public function create($id) : View | RedirectResponse
{
- if ($consumable = Consumable::with('users')->find($id)) {
+ if ($consumable = Consumable::find($id)) {
$this->authorize('checkout', $consumable);