user()->can('update', $this->route('lecturer')); } /** * @return array> */ public function rules(): array { return [ 'name' => ['sometimes', 'required', 'string', 'max:255'], 'subtitle' => ['sometimes', 'nullable', 'string'], 'intro' => ['sometimes', 'nullable', 'string'], 'description' => ['sometimes', 'nullable', 'string'], 'active' => ['sometimes', 'boolean'], 'website' => ['sometimes', 'nullable', 'url', 'max:255'], 'twitter_username' => ['sometimes', 'nullable', 'string', 'max:255'], 'nostr' => ['sometimes', 'nullable', 'string', 'max:255'], 'lightning_address' => ['sometimes', 'nullable', 'string', 'max:255'], 'lnurl' => ['sometimes', 'nullable', 'string'], 'node_id' => ['sometimes', 'nullable', 'string', 'max:255'], 'paynym' => ['sometimes', 'nullable', 'string'], 'team_id' => ['sometimes', 'nullable', 'integer', 'exists:teams,id'], ]; } /** * @return array */ public function messages(): array { return [ 'team_id.exists' => 'Das angegebene Team existiert nicht.', ]; } }