Revision 1298 | Revision 1304 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?phpnamespace App\Http\Requests;use App\Models\BackendUser;use Illuminate\Foundation\Http\FormRequest;use Illuminate\Validation\Rule;class UserUpdateRequest extends FormRequest{/*** Determine if the user is authorized to make this request.** @return bool*/public function authorize(): bool{return true;}/*** Get the validation rules that apply to the request.** @return array<string, mixed>*/public function rules(): array{return ['email' => 'bail|required|email|max:255', Rule::unique(BackendUser::class)->ignore($this->user()->email),];}protected function prepareForValidation(): void{$this->merge( [ "email" => $this->user . "@" . env( "shop" ) ] );}}