Major additions: - Knowledge base with categories, articles, revisions, and voting - Enhanced ticket system: departments, SLA policies, canned responses, tags, custom fields, satisfaction ratings, internal notes - Multi-currency support with exchange rate sync - Shopping cart and quote system with PDF generation - Affiliate program with referrals, commissions, and payouts - Account credits, credit notes, and debit notes - Staff management with granular role-based permissions - Fraud detection and order risk assessment - ServerHunter SEO integration - Service lifecycle events (suspend/unsuspend/terminate) - Service management panels for VPS, Dedicated, Hosting, and Game servers - Plan lifecycle fields and per-customer overrides - 30+ migrations, 17 factories, 8 feature test suites Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
1002 B
PHP
32 lines
1002 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Admin;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class UpdateCustomerRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true; // admin middleware handles auth
|
|
}
|
|
|
|
/** @return array<string, array<int, mixed>> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['required', 'string', 'max:255'],
|
|
'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($this->route('user'))],
|
|
'phone' => ['nullable', 'string', 'max:50'],
|
|
'company' => ['nullable', 'string', 'max:255'],
|
|
'status' => ['required', 'in:active,suspended,banned'],
|
|
'admin_notes' => ['nullable', 'string', 'max:10000'],
|
|
'override_days_to_suspend' => ['nullable', 'integer', 'min:1'],
|
|
'override_days_to_terminate' => ['nullable', 'integer', 'min:1'],
|
|
];
|
|
}
|
|
}
|