No description
Adds Pest test suites for the four critical admin modals using test double components, following the existing LivewireModalTest.php pattern. Covers tab navigation, form validation, CRUD flows, filter combinations, and state management. Fixes #7. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| .gemini | ||
| .github | ||
| app | ||
| bootstrap | ||
| changelog/2026/jan | ||
| config | ||
| database | ||
| docs | ||
| public | ||
| resources | ||
| routes | ||
| Service | ||
| src | ||
| storage | ||
| tests | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| artisan | ||
| CLAUDE.md | ||
| cliff.toml | ||
| composer.json | ||
| FINDINGS.md | ||
| GEMINI.md | ||
| LICENSE | ||
| package.json | ||
| phpunit.xml | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| TODO.md | ||
| vite.config.js | ||
Core Admin Package
Admin panel components, Livewire modals, and service management interface for the Core PHP Framework.
Installation
composer require lthn/php-admin
Features
Admin Menu System
Declarative menu registration with automatic permission checking:
use Core\Front\Admin\Contracts\AdminMenuProvider;
class MyModuleMenu implements AdminMenuProvider
{
public function registerMenu(AdminMenuRegistry $registry): void
{
$registry->addItem('products', [
'label' => 'Products',
'icon' => 'cube',
'route' => 'admin.products.index',
'permission' => 'products.view',
]);
}
}
Livewire Modals
Full-page Livewire components for admin interfaces:
use Livewire\Component;
use Livewire\Attributes\Title;
#[Title('Product Manager')]
class ProductManager extends Component
{
public function render(): View
{
return view('admin.products.manager')
->layout('hub::admin.layouts.app');
}
}
Form Components
Reusable form components with authorization:
<x-forms.input>- Text inputs with validation<x-forms.select>- Dropdowns<x-forms.checkbox>- Checkboxes<x-forms.toggle>- Toggle switches<x-forms.textarea>- Text areas<x-forms.button>- Buttons with loading states
<x-forms.input
name="name"
label="Product Name"
wire:model="name"
required
/>
Global Search
Extensible search provider system:
use Core\Admin\Search\Contracts\SearchProvider;
class ProductSearchProvider implements SearchProvider
{
public function search(string $query): array
{
return Product::where('name', 'like', "%{$query}%")
->take(5)
->get()
->map(fn($p) => new SearchResult(
title: $p->name,
url: route('admin.products.edit', $p),
icon: 'cube'
))
->toArray();
}
}
Service Management Interface
Unified dashboard for viewing workspace services and statistics.
Configuration
The package auto-discovers admin menu providers and search providers from your modules.
Requirements
- PHP 8.2+
- Laravel 11+ or 12+
- Livewire 3.0+
- Flux UI 2.0+
Changelog
See changelog/2026/jan/features.md for recent changes.
License
EUPL-1.2 - See LICENSE for details.