承接 h1ch4m/blade-component-previewer 相关项目开发

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

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

h1ch4m/blade-component-previewer

最新稳定版本:v1.0.0

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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固