- Öffentliches Widerrufsformular /widerruf mit Bestell-Lookup (throttled) - Bestätigungsmail an Kunde + Weiterleitung an bestellungen@ (config app.withdrawal_mail) - Admin-Übersicht/-Detail unter /admin/withdrawals inkl. Sidenav-Eintrag - Widerruf-Button in Portal-Bestellansicht und Footer-Links - Model OrderWithdrawal + Migration + Factory + Tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
919 B
PHP
36 lines
919 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Withdrawal;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class WithdrawalLookupRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, array<int, mixed>>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'order_number' => ['required', 'string', 'max:50'],
|
|
'email' => ['required', 'email', 'max:255'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'order_number.required' => __('validation.required', ['attribute' => __('withdrawal.order_number')]),
|
|
'email.required' => __('validation.required', ['attribute' => __('withdrawal.email')]),
|
|
'email.email' => __('validation.email', ['attribute' => __('withdrawal.email')]),
|
|
];
|
|
}
|
|
}
|