vormiaphp/ui-livewireflux-admin
Laravel admin panel package for Vormia apps with Livewire 4 + Flux. Ships prebuilt routes, views, and Livewire components for managing categories, inheritance, locations, availability, and admin users, plus automatic sidebar integration and role assignment support.
A Laravel package that provides a complete admin panel solution with pre-built components, routes, and views for managing categories, inheritance, locations, availability, and admin users. Built with Livewire 4 and Flux for a modern, reactive admin interface.
Vormia UI Livewire Flux Admin is a comprehensive admin panel package for Laravel applications that includes:
docs/GUIDE.md#roles-assign-on-registration for assigning roles on registrationThis package is designed to work seamlessly with the Vormia ecosystem and follows Laravel best practices.
This package supports:
This package runs on Vormia 5.4+ with Livewire 4.1+ and Flux 2.13.1+. Required dependencies (installed automatically when you require this package):
Flux 1.x, Fortify 2.x, and older minors outside the ranges above are not in the supported matrix.
Developer guide: docs/GUIDE.md — UI flow and style, AI promptbook, Fortify (PasswordValidationRules, EnsureUserIsActive), assigning roles on registration, and quick-reference layout patterns (YAML frontmatter at the top is for optional use as a Cursor project rule).
This package targets Livewire 4 where Volt is bundled with Livewire. The admin page stubs are Livewire anonymous components (new class extends Component) and rely on your app’s default Livewire layout.
composer require vormiaphp/ui-livewireflux-admin
php artisan ui-livewireflux-admin:install
This command will:
AdminPanel, etc.)--tag=fortify-support: PasswordValidationRules and related files under app/Actions/Fortify/ when PasswordValidationRules is not present yet). Fortify database migrations are not published by install (see Fortify database (optional) below and docs/GUIDE.md#fortify-passwords-publish-and-active-users for re-publish with --force on the support tag only)routes/web.phpEnsureUserIsActive.php — register it in Fortify per docs/GUIDE.md#fortify-passwords-publish-and-active-usersAfter installation, verify that:
app/View/Components/AdminPanel.php and related views are presentapp/Actions/Fortify/ contains the Fortify support stubs (including PasswordValidationRules when the publish step ran). New migration files under database/migrations/ from Fortify appear only if you run vendor:publish --tag=fortify-migrations (install does not add them).routes/web.phpThis package’s install command does not run vendor:publish for Fortify’s fortify-migrations tag. If you use Fortify two-factor authentication or passkeys and your database does not already have the required columns or passkeys table, publish migrations yourself, then migrate:
php artisan vendor:publish --tag=fortify-migrations
php artisan migrate
Many apps already have two_factor_* columns on users (for example from Jetstream, Breeze, or an earlier manual publish). If php artisan migrate fails with duplicate column errors on two_factor_secret, do not run the duplicate migration: remove the extra migration file if it was never applied, or adjust your schema/docs per docs/GUIDE.md#fortify-passwords-publish-and-active-users.
If the routes were not automatically injected into routes/web.php, manually add them:
routes/web.phpRoute::middleware(['auth'])->group(function () { ... }); blockvendor/vormiaphp/ui-livewireflux-admin/src/stubs/reference/routes-to-add.php inside this blockExample:
<?php
Route::middleware(['auth'])->group(function () {
// ... existing routes ...
// Add admin routes here
Route::group(['prefix' => 'admin'], function () {
// Routes from routes-to-add.php
});
});
If the sidebar menu wasn't injected:
resources/views/layouts/app/sidebar.blade.php, then resources/views/components/layouts/app/sidebar.blade.phpflux:sidebar.group (the group containing the Dashboard menu item)vendor/vormiaphp/ui-livewireflux-admin/src/stubs/reference/sidebar-menu-to-add.blade.php inside the Platform group, before the closing </flux:sidebar.group> tagExample:
<flux:sidebar.group :heading="__('Platform')" class="grid">
<flux:sidebar.item icon="home" :href="route('dashboard')" wire:navigate>
{{ __('Dashboard') }}
</flux:sidebar.item>
<!-- Add admin menu items here, before the closing tag -->
</flux:sidebar.group>
To attach roles to new users (e.g. in registration), use the Role model from the Vormia package (Vormia\Vormia\Models\Role) and look up by name:
use Vormia\Vormia\Models\Role;
// In your user registration logic
$user = User::create([...]);
$defaultRole = Role::where('name', 'user')->first();
if ($defaultRole) {
$user->roles()->attach($defaultRole);
}
A reusable Blade component for consistent admin panel layouts:
<x-admin-panel
header="Categories"
desc="Manage your categories"
:button="$createButton"
>
<!-- Your content here -->
</x-admin-panel>
Location: app/View/Components/AdminPanel.php and resources/views/components/admin-panel.blade.php
Pre-configured routes for all admin sections:
/admin/categories, /admin/categories/create, /admin/categories/edit/{id}/admin/inheritance, /admin/inheritance/create, /admin/inheritance/edit/{id}/admin/countries, /admin/countries/create, /admin/countries/edit/{id}/admin/cities, /admin/cities/create, /admin/cities/edit/{id}/admin/availabilities, /admin/availabilities/create, /admin/availabilities/edit/{id}/admin/admins, /admin/admins/create, /admin/admins/edit/{id}All routes are protected by auth middleware.
Single-file Livewire components for each admin section:
resources/views/livewire/admin/admins/ - Admin user managementresources/views/livewire/admin/control/categories/ - Category managementresources/views/livewire/admin/control/inheritance/ - Inheritance managementresources/views/livewire/admin/control/locations/ - Location management (countries/cities)resources/views/livewire/admin/control/availability/ - Availability managementEach section includes:
index.blade.php - List viewcreate.blade.php - Create formedit.blade.php - Edit formThe sidebar automatically includes:
Role models live in the Vormia package (Vormia\Vormia\Models\Role). To assign roles to new users on registration, see docs/GUIDE.md#roles-assign-on-registration.
File Overwrites
Middleware Requirements
auth middlewareRole models
Vormia\Vormia\Models\Role. See docs/GUIDE.md#roles-assign-on-registration for how to assign roles on registration.Sidebar File Location
resources/views/layouts/app/sidebar.blade.php, then resources/views/components/layouts/app/sidebar.blade.phpflux:sidebar.group, before the closing </flux:sidebar.group> tagRoute Injection
routes/web.phpRoute::middleware(['auth'])->group(function () { ... });Custom Modifications
storage/app/ui-livewireflux-admin-backups/)Dependencies
vormiaphp/vormia ^5.4, livewire/livewire ^4.1, livewire/flux ^2.13.1, and laravel/fortify ^1.34. Volt is bundled with Livewire 4.Display comprehensive help information:
php artisan ui-livewireflux-admin:help
This command shows:
Verify that all required and optional dependencies are installed:
php artisan ui-livewireflux-admin:check-dependencies
This command checks for:
Update all package files to the latest version:
php artisan ui-livewireflux-admin:update
What happens:
storage/app/ui-livewireflux-admin-backups/Force update (skip confirmation):
php artisan ui-livewireflux-admin:update --force
⚠️ Warning: This will overwrite any custom modifications to package files. Always backup your changes first!
Remove all package files and configurations:
php artisan ui-livewireflux-admin:uninstall
What gets removed:
app/View/Components/AdminPanel.phpapp/Actions/Fortify/EnsureUserIsActive.php (if copied)resources/views/components/admin-panel.blade.phpresources/views/livewire/admin/ directoryroutes/web.phpsidebar.blade.phpForce uninstall (skip confirmation):
php artisan ui-livewireflux-admin:uninstall --force
⚠️ Warning: This action cannot be undone! Make sure you have backups before uninstalling.
Manual Route Removal:
If you need to manually remove routes, simply delete routes based on their names from routes/web.php:
admin.categories.index, admin.categories.create, admin.categories.editadmin.inheritance.index, admin.inheritance.create, admin.inheritance.editadmin.countries.index, admin.countries.create, admin.countries.editadmin.cities.index, admin.cities.create, admin.cities.editadmin.availabilities.index, admin.availabilities.create, admin.availabilities.editadmin.admins.index, admin.admins.create, admin.admins.editAfter uninstallation:
composer.json:
composer remove vormiaphp/ui-livewireflux-admin
composer update to clean up dependenciesUILivewireFlux-Admin/
├── src/
│ ├── Console/
│ │ └── Commands/
│ │ ├── InstallCommand.php
│ │ ├── UpdateCommand.php
│ │ ├── UninstallCommand.php
│ │ ├── HelpCommand.php
│ │ └── CheckDependenciesCommand.php
│ ├── stubs/ # Files copied to Laravel app
│ │ ├── app/
│ │ │ ├── View/
│ │ │ │ └── Components/
│ │ │ │ └── AdminPanel.php
│ │ │ └── Actions/
│ │ │ └── Fortify/
│ │ │ └── EnsureUserIsActive.php
│ │ └── resources/
│ │ └── views/
│ │ ├── components/
│ │ │ └── admin-panel.blade.php
│ │ └── livewire/
│ │ └── admin/
│ │ ├── admins/
│ │ └── control/
│ │ ├── availability/
│ │ ├── categories/
│ │ ├── inheritance/
│ │ └── locations/
│ │ └── reference/
│ │ ├── routes-to-add.php # Routes snippet
│ │ └── sidebar-menu-to-add.blade.php # Sidebar snippet
│ ├── UILivewireFlux.php
│ └── UILivewireFluxAdminServiceProvider.php
├── composer.json
└── README.md
<x-admin-panel
header="Manage Categories"
desc="Create, edit, and delete categories"
:button="
<a href='{{ route('admin.categories.create') }}' class='btn btn-primary'>
Create Category
</a>
"
>
<!-- Your table or content here -->
<table>
<!-- ... -->
</table>
</x-admin-panel>
All routes are accessible via their named routes:
route('admin.categories.index')
route('admin.categories.create')
route('admin.categories.edit', ['id' => 1])
Problem: Installation command fails with dependency errors.
Solution:
vormiaphp/vormia ^5.4, livewire/livewire ^4.1, livewire/flux ^2.13.1, and laravel/fortify ^1.34 are installed (see Laravel Compatibility above).php artisan ui-livewireflux-admin:check-dependencies to verifyProblem: Admin routes return 404 or are not accessible.
Solution:
routes/web.phpRoute::middleware(['auth'])->group(...)php artisan route:clear and php artisan route:cacheProblem: Sidebar menu items are not visible.
Solution:
livewire/flux is installed: composer show livewire/fluxresources/views/layouts/app/sidebar.blade.php or resources/views/components/layouts/app/sidebar.blade.phpflux:sidebar.group (before </flux:sidebar.group>) from vendor/vormiaphp/ui-livewireflux-admin/src/stubs/reference/sidebar-menu-to-add.blade.phpphp artisan view:clearProblem: New users are not getting the expected role.
Solution:
Use Vormia\Vormia\Models\Role from the Vormia package and attach by role model (e.g. look up by name). See docs/GUIDE.md#roles-assign-on-registration for how to update CreateNewUser to attach roles on registration.
MIT
For issues, questions, or contributions, please visit:
How can I help you explore Laravel packages today?