streats22/laragrape
Composer 安装命令:
composer require streats22/laragrape
包简介
A Laravel package for GrapesJS + Filament block builder integration.
README 文档
README
LaraGrape combines the visual power of GrapesJS with the modern admin experience of Filament to deliver a seamless, developer-friendly CMS-like system for Laravel.
🚀 Quick Start
1. Install the Package
composer require streats22/laragrape
2. Run the Setup Command
php artisan laragrape:setup --all
3. Create Admin User
php artisan make:filament-user
4. Build Frontend Assets
npm install npm run build
5. Start Your Application
php artisan serve
- Admin Panel: Visit
/adminto access Filament - Frontend: Visit
/to see your site
✨ Features
🎨 Visual Page Builder
- GrapesJS Integration: Drag-and-drop page building
- Pre-built Blocks: Hero sections, cards, forms, and more
- Responsive Design: Mobile-first approach with Tailwind CSS
- Live Preview: See changes in real-time
🛠️ Admin Panel
- Filament 5: Modern, responsive admin interface
- Page Management: Create, edit, and publish pages
- Custom Blocks: Build and manage reusable components
- Site Settings: Configure header, footer, and general settings
- Tailwind Config: Dynamic theme management
🔧 Developer Experience
- Laravel 12+ Compatible: Built for modern Laravel
- Alpine.js: Lightweight JavaScript framework
- Modular Architecture: Clean, maintainable code structure
- Extensible: Easy to customize and extend
📦 What's Included
Core Components
- ✅ Pages System: Full CRUD with GrapesJS integration
- ✅ Custom Blocks: Visual block builder with live preview
- ✅ Site Settings: Comprehensive configuration management
- ✅ Tailwind Config: Dynamic theme system
- ✅ Admin Panel: Filament-based administration
- ✅ Frontend Layout: Responsive, SEO-optimized templates
Database Tables
pages- Page content and metadatacustom_blocks- User-created blockssite_settings- Site configurationtailwind_configs- Theme configurations
Filament Resources
- PageResource: Page management with visual editor
- CustomBlockResource: Block builder and management
- SiteSettingsResource: Site configuration
- TailwindConfigResource: Theme management
🛠️ Setup Command Options
The laragrape:setup command provides comprehensive setup with error handling:
php artisan laragrape:setup [options]
Available Options
| Option | Description |
|---|---|
--all |
Complete setup (publish, migrate, seed) |
--migrate |
Run migrations after publishing |
--seed |
Run seeders after publishing |
--force |
Overwrite existing files |
Examples
# Complete setup php artisan laragrape:setup --all # Publish only php artisan laragrape:setup # Publish and migrate php artisan laragrape:setup --migrate
🔄 Update Command
The laragrape:update command allows you to selectively update LaraGrape components without doing a full installation:
php artisan laragrape:update [options]
Available Options
| Option | Description |
|---|---|
--all |
Update all components |
--config |
Update configuration files only |
--views |
Update view files only |
--migrations |
Update migration files only |
--filament |
Update Filament components only |
--assets |
Update frontend assets only |
--controllers |
Update controllers only |
--services |
Update services only |
--routes |
Update routes only |
--models |
Update models only |
--seeders |
Update seeders only |
--console |
Update console commands only |
--run-migrate |
Run migrations after updating |
--run-seed |
Run seeders after updating |
--force |
Overwrite existing files without asking |
Examples
# Interactive update (select components from menu) php artisan laragrape:update # Update all components php artisan laragrape:update --all # Update specific components php artisan laragrape:update --filament --assets # Update with database operations php artisan laragrape:update --all --run-migrate php artisan laragrape:update --all --run-seed php artisan laragrape:update --all --run-migrate --run-seed # Force update without confirmation php artisan laragrape:update --all --force
Note: The update command doesn't install Filament (assumes it's already installed). Use the setup command for initial installation.
🎯 Key Features
Visual Page Builder
- Drag & Drop: Intuitive block-based editing
- Pre-built Blocks: 20+ ready-to-use components
- Custom Blocks: Create your own reusable components
- Responsive: Mobile-first design approach
- Live Preview: Real-time editing experience
Admin Panel
- Modern Interface: Filament 5 admin panel
- Page Management: Full CRUD operations
- Block Builder: Visual custom block creation
- Site Settings: Comprehensive configuration
- Theme Management: Dynamic Tailwind configuration
Developer Tools
- Error Handling: Robust setup with fallbacks
- Namespace Management: Automatic App namespace conversion
- Asset Management: CSS, JS, and view publishing
- Command Line: Artisan commands for management
📚 Documentation
- Setup Guide - Complete installation and configuration
- Block System - Dynamic block loading and management
- Component System - Modular component architecture
- Custom Blocks - Visual block builder guide
- API Documentation - Service classes and methods
- Troubleshooting - Common issues and solutions
🎨 Customization
Adding Custom Blocks
- Use the visual block builder in the admin panel
- Or create
.blade.phpfiles inresources/views/filament/blocks/ - Add metadata comments for automatic loading
Styling
- Global Styles: Edit
resources/css/site.css - Tailwind Config: Use the admin panel for dynamic themes
- Component Styles: Add custom CSS to blocks
Extending
- New Resources: Add custom Filament resources
- Custom Services: Extend the service classes
- Frontend: Modify the layout components
🚀 Why Choose LaraGrape?
- No Code Required: Visual page building for non-developers
- Developer Friendly: Clean, maintainable Laravel code
- Modern Stack: Built with Laravel 12+, Filament 5, and Tailwind CSS 4
- Extensible: Easy to customize and extend
- Production Ready: Robust error handling and fallbacks
- Active Development: Regular updates and improvements
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone the repository git clone https://github.com/your-org/laragrape.git # Install dependencies composer install npm install # Run tests php artisan test
📄 License
This package is open-sourced software licensed under the MIT license.
🆘 Support
- Documentation: Check the docs in this repository
- Issues: Report bugs on GitHub
- Discussions: Join our community discussions
🆕 What's New in V1.2
Major Features
- ✅ Enhanced Setup Command with robust error handling
- ✅ Dynamic Tailwind CSS System with theme management
- ✅ Advanced Block System with improved compatibility
- ✅ Comprehensive Site Settings with grouped configuration
Improvements
- ✅ 50%+ Performance Improvement
- ✅ Complete Documentation (6 comprehensive guides)
- ✅ Enhanced Error Handling throughout the system
- ✅ Mobile-First Responsive Design
LaraGrape: The easiest way to add a modern, visual CMS to your Laravel project—without sacrificing developer control. 🍇
streats22/laragrape 适用场景与选型建议
streats22/laragrape 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 141 次下载、GitHub Stars 达 4, 最近一次更新时间为 2025 年 06 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cms」 「laravel」 「page builder」 「grapesjs」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 streats22/laragrape 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 streats22/laragrape 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 streats22/laragrape 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table.
Plug-ins for DataTables
GraphQL authentication for your headless Craft CMS applications.
This package helps you use bitwise enums in PHP and Laravel.
Set Links with a specific language parameter
Supercharged text field validation.
统计信息
- 总下载量: 141
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-30