No description
Find a file
Snider 5a2ce4bab8 test(layout): add comprehensive tests for HLCRF layout system
Add tests for the HLCRF (Header-Left-Content-Right-Footer) layout system
covering all required functionality:

- Layout variant parsing (C, HC, HCF, LC, CR, LCR, HLCRF, etc.)
- Self-documenting ID system (H-0, C-R-2, data-block, data-slot)
- Nested layout rendering with correct path propagation
- Slot rendering with multiple content types (string, Htmlable, closures)
- Alias methods (addHeader, addLeft, addContent, addRight, addFooter)
- Attributes and CSS class management
- Semantic HTML structure (header, aside, main, footer elements)
- Real-world layout patterns (admin dashboard, docs site, email client)
- Edge cases and boundary conditions

80+ tests covering the complete HLCRF layout system.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:27:30 +00:00
.gemini Initial commit 2026-01-26 20:48:24 +00:00
.github Initial commit 2026-01-26 20:48:24 +00:00
app Initial commit 2026-01-26 20:48:24 +00:00
bootstrap Initial commit 2026-01-26 20:48:24 +00:00
changelog/2026/jan Add Hub service layer and admin navigation restructure 2026-01-27 16:12:01 +00:00
config Initial commit 2026-01-26 20:48:24 +00:00
database Initial commit 2026-01-26 20:48:24 +00:00
docs docs: add package documentation 2026-01-29 10:47:50 +00:00
public Initial commit 2026-01-26 20:48:24 +00:00
resources monorepo sepration 2026-01-26 20:56:28 +00:00
routes Initial commit 2026-01-26 20:48:24 +00:00
Service Add Hub service layer and admin navigation restructure 2026-01-27 16:12:01 +00:00
src refactor: update namespaces for L1 package convention 2026-01-27 17:34:41 +00:00
storage Initial commit 2026-01-26 20:48:24 +00:00
tests test(layout): add comprehensive tests for HLCRF layout system 2026-01-29 19:27:30 +00:00
.editorconfig Initial commit 2026-01-26 20:48:24 +00:00
.env.example Initial commit 2026-01-26 20:48:24 +00:00
.gitattributes Initial commit 2026-01-26 20:48:24 +00:00
.gitignore Initial commit 2026-01-26 20:48:24 +00:00
AGENTS.md Initial commit 2026-01-26 20:48:24 +00:00
artisan Initial commit 2026-01-26 20:48:24 +00:00
CLAUDE.md docs: update CLAUDE.md for core-admin package specifics 2026-01-28 14:03:40 +00:00
cliff.toml Initial commit 2026-01-26 20:48:24 +00:00
composer.json Add Hub service layer and admin navigation restructure 2026-01-27 16:12:01 +00:00
GEMINI.md Initial commit 2026-01-26 20:48:24 +00:00
LICENSE Initial commit 2026-01-26 20:48:24 +00:00
package.json Initial commit 2026-01-26 20:48:24 +00:00
phpunit.xml Initial commit 2026-01-26 20:48:24 +00:00
postcss.config.js Initial commit 2026-01-26 20:48:24 +00:00
README.md monorepo sepration 2026-01-26 20:56:28 +00:00
tailwind.config.js Initial commit 2026-01-26 20:48:24 +00:00
TODO.md test(layout): add comprehensive tests for HLCRF layout system 2026-01-29 19:27:30 +00:00
vite.config.js Initial commit 2026-01-26 20:48:24 +00:00

Core Admin Package

Admin panel components, Livewire modals, and service management interface for the Core PHP Framework.

Installation

composer require host-uk/core-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
/>

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.