user()->can('create', Product::class); } public function rules() { return [ 'product_key' => 'required|unique:products,product_key,null,null,company_id,'.auth()->user()->companyId(), 'cost' => 'numeric', 'price' => 'numeric', 'qty' => 'numeric', ]; } }