PHPackages                             ladbu/laravel-ladwire-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ladbu/laravel-ladwire-module

ActiveLaravel-package[Utility &amp; Helpers](/categories/utility)

ladbu/laravel-ladwire-module
============================

A modular Laravel package that adds Ladwire components to fresh Laravel projects

v1.4.10(3mo ago)020MITPHPPHP ^8.2

Since Feb 17Pushed 3mo agoCompare

[ Source](https://github.com/rockshot3313/ladbu)[ Packagist](https://packagist.org/packages/ladbu/laravel-ladwire-module)[ RSS](/packages/ladbu-laravel-ladwire-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (33)Used By (0)

Laravel Ladwire Module with Flux UI
===================================

[](#laravel-ladwire-module-with-flux-ui)

A modular Laravel package that adds Ladwire components to fresh Laravel projects with dashboard, user management, and settings functionality, built with modern Flux UI components.

Features
--------

[](#features)

- **Modular Architecture**: Install only the modules you need
- **Dashboard**: Statistics and recent activity overview
- **User Management**: CRUD operations for users with search and pagination
- **Settings**: Configurable application settings
- **Ladwire Powered**: All components use Ladwire for reactive UI
- **Flux UI**: Modern, accessible component library
- **Easy Integration**: Simple installation and configuration

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.0+ / 12.0+
- Livewire 3.0+ / 4.0+
- Flux UI 1.0+ / 2.0+

Installation
------------

[](#installation)

### For Package Development

[](#for-package-development)

If you're developing this package or want to use it in an existing project:

```
# Install latest version (v1.1.0+ with starter kit structure)
composer require ladbu/laravel-ladwire-module

# Install specific version
composer require ladbu/laravel-ladwire-module:1.1.0

# Install older version (original structure)
composer require ladbu/laravel-ladwire-module:1.0.8
```

### Version Information

[](#version-information)

- **v1.1.0+** - Current architecture with local modules and clean installer
- **v1.0.8** - Original Ladwire structure

### For Fresh Laravel Projects

[](#for-fresh-laravel-projects)

For fresh Laravel projects, you can use the installer command to set up everything quickly:

```
# Install the package in your fresh project
composer require ladbu/laravel-ladwire-module

# Install specific modules
php artisan ladwire:install-clean --dashboard
php artisan ladwire:install-clean --user-management
php artisan ladwire:install-clean --settings

# Install all modules
php artisan ladwire:install-clean
```

### Post-Installation Steps

[](#post-installation-steps)

After running the installer command:

1. **Install and configure Flux UI** (if not already installed):

```
php artisan flux:install
```

2. **Publish views** (optional, if you want to customize them):

```
php artisan vendor:publish --tag="views" --provider="Ladbu\\LaravelLadwireModule\\LaravelLadwireModuleServiceProvider"
```

### For Fresh Projects - Quick Start

[](#for-fresh-projects---quick-start)

The installer command creates files following the Laravel Livewire starter kit structure:

#### Generated File Structure:

[](#generated-file-structure)

```
app/
├── Http/
│   └── Controllers/
│       ├── DashboardController.php
│       └── SettingsController.php
├── Livewire/
│   └── Actions/
│       └── Logout.php
└── Providers/
    └── LaravelLadwireModuleServiceProvider.php

resources/
└── views/
    ├── layouts/
    │   └── app.blade.php
    ├── pages/
    │   ├── auth/
    │   │   ├── login.blade.php
    │   │   ├── register.blade.php
    │   │   ├── forgot-password.blade.php
    │   │   ├── reset-password.blade.php
    │   │   ├── verify-email.blade.php
    │   │   ├── confirm-password.blade.php
    │   │   └── two-factor-challenge.blade.php
    │   └── settings/
    │       ├── layout.blade.php
    │       ├── ⚡profile.blade.php
    │       ├── ⚡password.blade.php
    │       ├── ⚡appearance.blade.php
    │       ├── ⚡two-factor.blade.php
    │       └── ⚡delete-user-form.blade.php
    ├── components/
    ├── ladwire/
    │   ├── dashboard.blade.php
    │   ├── user-management.blade.php
    │   └── settings.blade.php
    ├── flux/
    └── partials/

routes/
├── web.php
└── settings.php

Package Templates (source):
src/
├── Templates/
│   ├── Controllers/
│   │   ├── DashboardController.php
│   │   ├── SettingsController.php
│   │   └── UserManagementController.php
│   └── Views/
│       ├── dashboard.blade.php
│       ├── settings.blade.php
│       └── user-management.blade.php
└── Console/
    └── Commands/
        └── InstallLadwireModuleClean.php

```

#### Example usage in your fresh project:

[](#example-usage-in-your-fresh-project)

```
// routes/web.php
Route::get('/', function () {
    return view('welcome');
})->name('home');

Route::view('dashboard', 'dashboard')
    ->middleware(['auth', 'verified'])
    ->name('dashboard');

Route::get('/dashboard', DashboardController::class)->name('dashboard');

require __DIR__.'/settings.php';
```

```
// routes/settings.php
Route::middleware(['auth'])->group(function () {
    Route::redirect('settings', 'settings/profile');
    Route::livewire('settings/profile', 'pages::settings.profile')->name('profile.edit');
});

Route::middleware(['auth', 'verified'])->group(function () {
    Route::livewire('settings/password', 'pages::settings.password')->name('user-password.edit');
    Route::livewire('settings/appearance', 'pages::settings.appearance')->name('appearance.edit');
    Route::livewire('settings/two-factor', 'pages::settings.two-factor')
        ->middleware([/* two-factor middleware */])
        ->name('two-factor.show');
});
```

```
{{-- resources/views/ladwire/dashboard.blade.php --}}

```

Usage
-----

[](#usage)

Once installed, you can access the modules at the following routes:

### Authentication Routes (Generated by Laravel Fortify)

[](#authentication-routes-generated-by-laravel-fortify)

- `/login` - User login
- `/register` - User registration
- `/forgot-password` - Password reset request
- `/reset-password` - Password reset form
- `/email/verify` - Email verification
- `/password/confirm` - Password confirmation

### Dashboard Module

[](#dashboard-module)

- `/dashboard` - Main dashboard (requires auth &amp; verification)
- Dashboard shows statistics and recent activity

### Settings Module

[](#settings-module)

- `/settings/profile` - Profile settings (requires auth)
- `/settings/password` - Password change (requires auth &amp; verification)
- `/settings/appearance` - Appearance settings (requires auth &amp; verification)
- `/settings/two-factor` - Two-factor authentication (requires auth &amp; verification)

### Ladwire Module Routes

[](#ladwire-module-routes)

- `/module-dashboard` - Ladwire dashboard component
- `/module-users` - Ladwire user management
- `/module-settings` - Ladwire settings component

### Using Components in Your Views

[](#using-components-in-your-views)

You can use the Livewire components following the inline component pattern (⚡ prefix):

```

    @livewire('pages::settings.profile')

    @livewire('pages::settings.password')

```

### Inline Component Structure

[](#inline-component-structure)

The starter kit uses inline Livewire components with the ⚡ prefix pattern:

```
// Example: resources/views/pages/settings/⚡profile.blade.php
