kamona/kui-laravel-jetstream
Prerequisites Check Ensure your Laravel project meets requirements:
php artisan jetstream:install livewire --teams)Installation
composer require kamona/kui-laravel-jetstream --dev
php artisan kui:install
The kui:install command replaces Jetstream’s default UI with K UI’s theme while preserving functionality.
First Use Case
/dashboard or /login to see the new UI.resources/views/vendor/kui/ for customizable Blade templates.config/kui.php for theme options (e.g., colors, logo).Theme Customization
php artisan vendor:publish --tag=kui-views
resources/views/vendor/kui/ (e.g., auth/login.blade.php).@extends('kui::layouts.app') in custom views to inherit K UI’s layout.Integration with Jetstream Features
/teams routes).TwoFactorAuthenticated middleware./user/tokens page for token management.Asset Management
vite.config.js includes:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
resources/css/app.css.Localization
php artisan vendor:publish --tag=kui-lang
resources/lang/{locale}/kui.php for translations.config/kui.php to toggle themes (e.g., theme: 'dark').routes/web.php:
Route::middleware(['auth:sanctum', 'verified'])->group(function () {
Route::get('/custom-page', [CustomController::class, 'index'])
->name('custom.page');
});
Profile).
Extend them by creating new Livewire components in app/Http/Livewire/ and referencing them in K UI’s views.Asset Conflicts
resources/views/vendor/kui/) to avoid overrides.Middleware Mismatches
verified) may not align with K UI’s routes.routes/web.php and ensure middleware matches Jetstream’s defaults.Team Feature Gaps
Team model or create custom Livewire components for additional fields.Vite/HMR Issues
resources/js/app.js imports K UI’s JS (if applicable) and check Vite’s input paths.php artisan view:clear after modifying K UI’s published views.npm run dev or npm run build to refresh assets.php artisan route:list to verify K UI’s routes are registered.storage/logs/livewire.log) for component errors.Theme Switching
config/kui.php. Test changes by toggling the theme key and clearing the view cache.Logo/Colors
config/kui.php:
'logo' => 'path/to/logo.svg',
'colors' => [
'primary' => '#3b82f6',
'secondary' => '#10b981',
],
app.css.Dark Mode
config/kui.php:
'dark_mode' => true,
Custom Components
app/Http/Livewire/ and referencing them in K UI’s views (e.g., @livewire('custom.component')).API Endpoints
/api/user). Extend these via Jetstream’s Fortify or Sanctum services.Notifications
resources/views/vendor/kui/notifications/.Database Seeding
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
How can I help you explore Laravel packages today?