Skip to content

Upgrading ​

This guide covers upgrading Laravel Nusa between releases. For the full list of changes in each release, see the changelog.

Upgrading to 0.2 from 0.1 ​

0.2.0 is the first breaking release. It adds the Blade/Alpine UI components, publishes database and static assets with every release, and raises the platform requirements.

Requirements ​

0.2 supports PHP 8.3+ and Laravel 12 or 13:

Requirement0.10.2
PHP^8.2^8.3
Laravel^9.0 | ^10.0 | ^11.0 | ^12.0 | ^13.0^12.0 | ^13.0

Upgrade PHP and Laravel first, then require the new line. A ^0.1 constraint will not install 0.2 on its own:

bash
composer require creasi/laravel-nusa:^0.2

If your application has to stay on PHP 8.2 or Laravel 9–11, stay on the 0.1 line instead:

bash
composer require creasi/laravel-nusa:^0.1

Page size validation ​

per_page is the documented parameter. In 0.1 only per-page was read. It still works as an alias and there is no plan to remove it. Both are validated as integers between 1 and 200:

Request0.10.2
?per-page=50worksworks (alias)
?per_page=50ignored, default page sizeworks
?per-page=0default page size422
?per-page=-1returned every row422
?per-page=1.5silently became 1422
?per-page=201accepted422

Replace 0 with an explicit page size, or paginate/chunk the query. If a client cannot handle a 422, clamp the value before sending it.

UI components ​

New in 0.2: <x-nusa::address-form>, <x-nusa::select> and <x-nusa::postal>. They need the JavaScript published once:

bash
php artisan vendor:publish --tag=nusa-assets

Then load it before Alpine in each layout:

blade
@nusaAssets

<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script>

There is no inline fallback: an unpublished asset renders the components as plain selects that never cascade. See Installation for CSP and asset URL notes.

Optional overrides:

  • --tag=nusa-views publishes the component views for editing.
  • --tag=creasi-lang publishes lang/vendor/creasico/{en,id}/nusa.php for labels and messages.

Nothing else changed at runtime. Existing models, routes and address tables keep working.

Released under the MIT License.