yungifez/artisan-ui
Artisan UI is a Laravel package that adds a clean web dashboard for browsing and running Artisan commands. Execute common development tasks, view command output, and streamline workflows without switching to the terminal.
April UI is a Laravel UI toolkit: the two fixes in v1.3.6 confirm it ships (a) an asset-registration layer that injects script/style tags into rendered views, and (b) a table builder with server-side sorting driven by the request. Start there.
Install and publish
composer require yungifez/april-ui
php artisan vendor:publish --tag=april-ui-config
php artisan vendor:publish --tag=april-ui-assets
Laravel package discovery registers the service provider; only add it manually if you have discovery disabled.
First places to look
config/april-ui.php — asset groups, table defaults, sort parameter names.First use case — a sortable listing
Render a table through the builder, mark a column sortable(), and let the request drive the sort:
return AprilTable::make(User::query())
->column('name')->sortable()
->column('created_at')->sortable()
->defaultSort('created_at', 'desc');
Click the column header; the query string should carry the sort key/direction and the builder should apply it. That is the single workflow most of this package's day-to-day value flows through.
Asset registration per request Since v1.3.6 the tag list is evaluated on each request rather than baked into the compiled Blade view. Use that:
// AppServiceProvider::boot()
AprilUI::assets()->register('charts', resource_path('js/charts.js'));
This now works even when views are cached (php artisan view:cache), which is the normal production state. Prefer registering in a service provider or a dedicated AssetServiceProvider over doing it inside controllers, so the ordering is deterministic.
Conditional bundles
if (request()->routeIs('reports.*')) {
AprilUI::assets()->register('reports', ...);
}
Per-request evaluation means environment- or route-specific bundles no longer require a view-cache clear between deploys.
Table sorting workflow
asc|desc) — never forward raw query input into orderBy.Livewire / SPA-ish flows Because assets are rebuilt per request, components that mount later (modals, tabs, lazy-loaded widgets) can register their own assets without stale tags. If you render fragments via AJAX, ensure the fragment response includes the asset tags — the per-request behaviour is what makes this correct.
Deterministic defaults Where you need a guaranteed order independent of user interaction (e.g. exports, API responses reusing the builder), call the ordering explicitly on the underlying query rather than relying on the builder's default, which user sort can now override.
Sort precedence changed in 1.3.6 (#69). The user-selected sort is now applied before the builder's own orderBy, so the chosen sort wins. Two consequences:
->orderBy() after the builder's sort to "force" an order.Asset tags are no longer frozen at compile time (#68). Upgrade benefits:
php artisan view:clear after changing which assets are registered.view:cache in CI/deploy no longer produces stale asset URLs.
Costs and caveats:Debugging the table sort
->toSql() / DB::listen) to confirm which orderBy won. This is the fastest way to diagnose a post-upgrade ordering change.asc/desc.Debugging assets
config/april-ui.php for a cached manifest/version key; the per-request fix covers view compilation, not your own cached config values.Extension points Prefer the package's registration and builder APIs over overriding published views: view overrides are exactly the layer whose compile-time caching caused the original bug, and they will not receive the per-request asset behaviour automatically. Keep overrides thin — a wrapper component around the table builder or a small service provider for assets ages better than a forked Blade file.
How can I help you explore Laravel packages today?