<?php
 namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class ProductViewRequest extends FormRequest { public function authorize(): bool { $product = $this->route('product'); return $this->user()->can('view', $product); } public function rules(): array { return [ ]; } } 