mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Drop the with users on the create checkout screen
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
759bb822ff
commit
9676d934d2
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue