h1ch4m/blade-component-previewer 问题修复 & 功能扩展

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

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

h1ch4m/blade-component-previewer

Composer 安装命令:

composer require h1ch4m/blade-component-previewer

包简介

A Laravel package for visually creating, editing, and previewing Blade components with live editing of Blade, CSS, and JS.

README 文档

README

Contents

A Laravel package for visually creating, editing, and previewing Blade components with live editing of Blade, CSS, and JS.

Image one:

Blade Component Previewer 1

Image two:

Blade Component Previewer 2

Features

  • List all available Blade components
  • Create new components (Blade, CSS, JS, PHP class)
  • Edit component Blade, CSS, and JS in the browser
  • Live preview with custom props
  • Delete components
  • Simple, self-contained UI

Installation

Note:
This package uses 'Ace Editor (AceJS)' for in-browser code editing. No extra installation is required, as 'AceJS' is bundled with the package UI.

Requirements:

  • PHP >= 8.0
  • Laravel >= 8.0
  • Composer
  1. Require the package via Composer:

    composer require h1ch4m/blade-component-previewer --dev
  2. Publish the config (optional):

    php artisan vendor:publish --provider="H1ch4m\BladeComponentPreviewer\BladeComponentPreviewerServiceProvider" --tag=config
    
  3. Access the previewer:

    Visit /blade-component-previewer in your browser (while your dev server is running).

  4. ⚠️ Add @stack to your project

    Add @stack (e.g. @stack('styles') and @stack('scripts')) to your layout before body

Usage

  • Create a new component:
    Click "New Component", enter a name (e.g., ButtonComponent), and start editing.
    When you create a new component, the following files will be generated automatically (the paths based on config file):

    • Blade view file (resources/views/components/{name}.blade.php).
    • CSS file (public/css/components/{name}.css).
    • JS file (public/js/components/{name}.js).
    • PHP class (app/View/Components/BladeComponentPreviewer/{Name}.php).
  • Edit Blade, CSS, JS:
    Use the in-browser editors to modify your component files.

  • Preview:
    The preview updates live as you edit.

  • Props:
    Add and edit props to test your component with different data, and those props will added as params in your component class.

  • Save/Delete:
    Use the "Save" and "Delete" buttons to persist or remove components.

Configuration

You can customize paths and namespaces in config/blade-component-previewer.php:

return [
    'bladePath' => 'components',      // Blade views directory
    'cssPath' => 'css/components',    // Public CSS directory
    'jsPath' => 'js/components',      // Public JS directory
    'classNamespace' => 'App\\View\\Components\\BladeComponentPreviewer',
    'classPath' => 'View/Components/BladeComponentPreviewer',
];

License

This package is open-sourced software licensed under the MIT license.

h1ch4m/blade-component-previewer 适用场景与选型建议

h1ch4m/blade-component-previewer 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 h1ch4m/blade-component-previewer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-14