user()->hasPermission('manage-backups'); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'filename' => [ 'required', 'string', 'regex:/^[a-zA-Z0-9_\-\.]+\.gz$/', // Basic safety against traversal and only allows .gz ], ]; } }