Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Chilean Bundle

Chilean Bundle Laravel Package

freshwork/chilean-bundle

Laravel package providing Chilean-specific helpers: RUT/RUN validation and formatting, regions and communes data, and localization utilities for building apps tailored to the Chilean market.

View on GitHub
Deep Wiki
Context7

Freshwork Chilean Bundle brings Chilean-specific data and validation to Laravel. It simplifies handling RUT/RUN, regions, communes, and local formats so you can build Chilean applications without writing custom rules or maintaining region data yourself.

  • RUT/RUN validation, cleaning, and formatting
  • Chilean regions and communes helpers
  • Phone number validation for Chilean formats
  • Native Laravel validation rules
  • Lightweight, configurable, and easy to integrate
Frequently asked questions about Chilean Bundle
How do I install freshwork/chilean-bundle in a Laravel app?
Install it with Composer using composer require freshwork/chilean-bundle. On Laravel versions with package auto-discovery, the service provider and facade are registered automatically, so no manual config edit is needed. If you are on an older Laravel setup, add the provider and facade alias to config/app.php manually. After that you can call the validators and helpers directly or wrap them in your own rules.
Which Laravel and PHP versions does freshwork/chilean-bundle support?
The package was built for Laravel 5 and its illuminate/support and PHP constraints may lag behind Laravel 11, 12, and PHP 8.3+. Before committing, run composer why-not freshwork/chilean-bundle against your target Laravel version to see the real constraint conflict. Pin the package version and lock your PHP and illuminate/support requirements in composer.json. Because it is a leaf dependency with no transitive baggage, conflict risk is low, but version drift is the realistic breakage vector.
How do I validate a Chilean RUT in a Laravel FormRequest?
The package ships RUT check-digit validation you can call directly or wire into Laravel's validator. The cleanest approach is to wrap it in a custom validation rule and reference that rule from your FormRequest, so the dependency never leaks into controllers. Keep the rule focused on validation and use a separate formatter for display. Add fixture-based tests for valid and invalid RUTs so a future package swap stays a one-file change.
Does freshwork/chilean-bundle include Chilean regions and communes?
Yes, it bundles Chile-specific constants and data such as regions and comunas alongside the RUT and IVA helpers. Treat that dataset as hard-coded unless you verify otherwise, and check how current it is before relying on it for address forms or shipping logic. If freshness matters, keep your own source of truth and use the package only as a fallback or seed. Confirm whether the dataset is updatable or static in the version you pin.
Does it provide Eloquent casts and models for RUT or CLP fields?
The package includes Eloquent casts and models intended for Chile-ready applications, so you can normalize RUT values and handle CLP amounts without writing the plumbing yourself. Use casts for storage normalization and keep formatting for the presentation layer. Test round-trips on real records, especially RUTs with leading zeros or a K check digit. If a cast behaves unexpectedly, an accessor and mutator pair is a simple fallback.
How does the RUT validation handle K, leading zeros, and malformed input?
RUT validation uses the standard mod-11 check-digit algorithm, which is deterministic and well understood, so the core logic risk is low. The open question is edge-case coverage: leading zeros, the K check digit, short and overlong inputs, and values with dots or dashes. Do not assume the package covers all of them; build a curated fixture set of known-valid and known-invalid RUTs and run it in CI. Validation should be pure with no network or file I/O, and formatting should be handled separately from validation.
Is freshwork/chilean-bundle safe to use in production?
Correctness risk is low because the RUT algorithm is commodity functionality, but the dominant risk is supply chain and longevity. It is a single-maintainer, informally presented project with modest adoption, so you would be an early production adopter with no SLA. The reported last release date also looks anomalous, so verify the real state on Packagist before trusting it as evidence of active maintenance. Pin the version, wrap it behind your own interfaces, and keep a fork contingency ready.
Does it calculate IVA, or only provide Chilean tax constants?
The package covers IVA/VAT handling and Chile-specific constants, but you should confirm whether it performs rate calculations or just exposes values. Check whether it supports the semantics you need, such as current rates and inclusive versus exclusive amounts, before wiring it into checkout or invoicing. If your SII or DTE flows need precise rounding rules, implement the calculation in your own service and use the package only for constants. Document which side owns the tax math.
Can I use freshwork/chilean-bundle outside Laravel or for non-Chilean apps?
It is a PHP Composer package, so the core validators and helpers can be used without Laravel; the service provider and facade are optional conveniences. For non-Chilean applications it is irrelevant by design, since it solves one country rather than a general localization strategy. In a polyglot or microservice estate, confine it to the single Chilean-facing service. Elsewhere, a small internal validator may be cheaper than adding the dependency.
How do I protect my app if freshwork/chilean-bundle is abandoned?
Define small internal contracts such as RutValidator and IvaCalculator, then bind the package behind them so a swap is a one-file change. Expose RUT validation as a custom Laravel rule and keep package calls out of controllers and views. Pin the version, run composer why-not before upgrading Laravel, and keep a fork or a hand-rolled mod-11 validator as a contingency. Roll it out to non-critical surfaces first and add fixture tests to CI so abandonment never becomes an outage.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource