承接 alizharb/laravel-themer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

alizharb/laravel-themer

Composer 安装命令:

composer require alizharb/laravel-themer

包简介

A professional theme management system for Laravel 11/12/13 with first-class Livewire 4 support, diagnostics, design tokens, and zero-config modular integration.

README 文档

README

Laravel Themer Banner

Latest Version on Packagist GitHub Tests Action Status GitHub PHPStan Action Status Total Downloads Licence

Laravel Themer is a robust, enterprise-grade theme management package for Laravel applications. It provides a seamless way to manage themes, including asset publishing, view overrides, Livewire 4 integration, and modular support. Designed for modern TALL stack applications, it simplifies the creation of multi-themed applications without the complexity.

✨ Features

  • 🏗️ Independent Vite Builds: Per-theme package.json and vite.config.js for total asset isolation.
  • 📦 NPM Workspaces: Zero-config workspace integration for shared dependencies and optimized storage.
  • Asset Shortcuts: Launch dev servers or build theme assets directly via theme:dev and theme:build.
  • 🛠️ Theme Management: Create, clone, safe-delete, and activate themes with consistent --theme support.
  • 🚀 Zero-IO Production Cache: High-performance architecture that evaluates deep inheritance chains and serializes them into a single fast-boot PHP array.
  • Interactive Wizards: Beautiful CLI prompts for generating and activating themes using laravel/prompts.
  • 🌈 Rich Metadata: Support for screenshots, tags, and management flags (removable, disableable) in theme.json.
  • Livewire 4 Integration: First-class support for Livewire components and layouts with theme-aware resolution.
  • 🎨 View Overrides: Intelligent view resolution cascading from Active Theme -> Parent Theme -> Application.
  • 🚀 Auto-Blade Discovery: Automatic registration of theme-specific Blade components and inheritance.
  • 🏷️ Theme Versioning: Support for version metadata in theme.json for easier dependency mapping.
  • 🚦 Ephemeral Switching: Temporarily switch themes for specific tasks using Themer::forTheme().
  • 🛣️ Route Middleware: Enforce specific themes for routes or groups via middleware('theme:name').
  • 🧩 Modular Support: Native integration with laravel-modular including dependency verification in theme:check.
  • 🛡️ Hierarchy Guard: Built-in validation to detect circular dependencies, missing parents, and asset health.
  • 🧭 Production Diagnostics: theme:doctor, theme:status, theme:debug, theme:graph, and theme:why expose theme health for teams and CI.
  • 🧪 Theme Previewing: Generate inactive-theme preview URLs with optional signed expiration using theme:preview.
  • 🎛️ Design Tokens: Store brand tokens in theme.json and expose them with theme_token(), theme:tokens, and @themeTokens.
  • 🧠 Laravel Boost Ready: Ships Boost guidelines and a theme-development skill for AI-assisted workflows.
  • 🔧 Artisan Commands: A comprehensive suite of commands (make, npm, dev, build, clone, delete, list, check, cache, lint) to natively manage themes.

📚 Documentation

For full documentation, please visit alizharb.github.io/laravel-themer or browse the docs/ directory.

For copy-ready release notes, see RELEASE_NOTES_1.4.0.md.

📦 Installation

Install the package via Composer:

composer require alizharb/laravel-themer

Quick Start (Recommended)

Run the installation command to automatically set up Laravel Themer:

php artisan themer:install

This interactive command will:

  • ✅ Publish the configuration file (config/themer.php)
  • ✅ Create the themes directory (default: themes/)
  • ✅ Optionally configure vite.config.js with the themerLoader for automatic theme asset bundling

Manual Configuration

If you prefer manual setup or need more control, see the Installation Guide for detailed instructions on:

  • Publishing configuration files
  • Setting up Vite integration
  • Configuring theme paths and discovery rules

🔗 Related Packages

Laravel Themer is part of a comprehensive modular ecosystem for Laravel applications:

Package Description
laravel-modular Framework-agnostic modular architecture with zero-config autoloading and 29+ Artisan command overrides. Required for modular theme discovery.
laravel-modular-livewire Official Livewire 4 bridge providing automatic component discovery and registration within modules.
laravel-modular-filament Official Filament v5 bridge enabling admin panel integration with automatic resource discovery in modules.
laravel-hooks Universal extensibility and plugin system for Laravel 12+ applications with WordPress-style hooks and filters.
filament-themer-luncher A comprehensive Filament v5 interface for managing, switching, and backing up themes.
filament-modular-luncher A powerful Filament v5 manager for listing, toggling, and managing system modules.

These packages work seamlessly together to provide a complete modular development experience.

📖 Usage

Creating a Theme

Generate a new theme with a standard directory structure:

php artisan theme:make "Dark Theme"

Managing Dependencies

Install packages into a theme workspace directly from the root:

php artisan theme:npm --theme=dark-theme install lodash

Developing Assets

Launch a dedicated Vite dev server for your theme:

php artisan theme:dev --theme=dark-theme

Cloning & Deletion

Safe and fast lifecycle management:

# Duplicate an existing theme
php artisan theme:clone "Summer Edition" --theme=dark-theme

# Safe removal (respects 'removable' flag)
php artisan theme:delete --theme=summer-edition

Activating a Theme

Switch the active theme globally:

php artisan theme:activate dark-theme

Production Diagnostics

Inspect and validate your theme system:

php artisan theme:doctor
php artisan theme:status
php artisan theme:debug dark-theme --json
php artisan theme:graph
php artisan theme:why dark-theme

Previewing Themes

Generate a preview URL for an inactive theme:

php artisan theme:preview dark-theme --signed --expires=30

Design Tokens

Expose theme-specific brand tokens:

php artisan theme:tokens dark-theme --css
@themeTokens

Livewire Integration

The package automatically registers Livewire components within your theme.

php artisan make:livewire Header --theme=dark-theme

🧪 Testing

We strictly enforce testing. Use the provided test suite to verify your themes:

vendor/bin/pest

💖 Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel Themer development. If you are interested in becoming a sponsor, please visit the Laravel Themer GitHub Sponsors page.

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING for details.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🌟 Acknowledgments

  • Laravel: For creating the most elegant PHP framework.
  • Spatie: For setting the standard on Laravel package development.

🔒 Security

If you discover any security-related issues, please email Ali Harb at harbzali@gmail.com.

📄 License

The MIT License (MIT). Please see License File for more information.

Made with ❤️ by Ali Harb

alizharb/laravel-themer 适用场景与选型建议

alizharb/laravel-themer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 580 次下载、GitHub Stars 达 5, 最近一次更新时间为 2026 年 01 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「package」 「theme」 「laravel」 「Themer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 alizharb/laravel-themer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 alizharb/laravel-themer 我们能提供哪些服务?
定制开发 / 二次开发

基于 alizharb/laravel-themer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-25