lthn/php-admin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lthn/php-admin

最新稳定版本:v0.0.3

Composer 安装命令:

composer require lthn/php-admin

包简介

Admin panel module for Core PHP framework

README 文档

README

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.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: EUPL-1.2
  • 更新时间: 2026-03-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固