定制 keendigit/laravel-cms 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

keendigit/laravel-cms

Composer 安装命令:

composer create-project keendigit/laravel-cms

包简介

Laravel 12 CMS Template with Extension System - A modern CMS framework with hot-pluggable extensions

README 文档

README

A modern, extensible CMS template built on Laravel 12 with a powerful extension system.

Features

  • Laravel 12 - Built on the latest Laravel framework
  • Extension System - Hot-pluggable extensions with isolated namespaces
  • Modern Frontend - Vue 3 + Inertia.js + Ant Design Vue
  • High Performance - Swoole/RoadRunner support for production
  • Flexible Architecture - Core/Extension separation for maintainability
  • PostgreSQL - Primary database with JSONB support for flexible data storage

Quick Start

Installation

composer create-project keendigit/laravel-cms my-cms-project
cd my-cms-project

Complete Setup

# Install dependencies and lock versions
composer install

# Configure your database in .env file:
# DB_CONNECTION=pgsql
# DB_HOST=127.0.0.1
# DB_PORT=5432
# DB_DATABASE=your_database_name
# DB_USERNAME=your_username
# DB_PASSWORD=your_password

# Generate application key
php artisan key:generate

# Finalize CMS setup (merges routes, publishes assets)
php artisan cms:finalize-setup

# Run migrations
php artisan migrate --seed

Frontend Setup

# Install frontend dependencies
npm install

# Build frontend assets
npm run build

# Or run development server
npm run dev

Development Server

# Using Laravel's built-in server
php artisan serve

# Or using Swoole (recommended for production)
php artisan swoole:http start

Directory Structure

keendigit-cms-template/
├── core/                    # Laravel core application
│   ├── app/                 # Application code
│   ├── config/              # Configuration files
│   ├── database/            # Migrations, factories, seeders
│   ├── resources/           # Views, frontend assets
│   └── routes/              # Route definitions
├── extensions/              # Extension modules
├── public/                  # Web server entry point
├── storage/                 # File storage
├── tests/                   # Test suites
└── vendor/                  # Composer dependencies

Extension System

Creating an Extension

php artisan extension:make my-extension

This creates a new extension in extensions/my-extension/ with the following structure:

extensions/my-extension/
├── Extension.php           # Main extension class
├── extension.json          # Extension manifest
├── src/                    # Extension source code
│   ├── Controllers/        # Controllers
│   ├── Models/             # Eloquent models
│   └── Services/           # Business logic
├── resources/              # Frontend resources
│   ├── js/                 # Vue components
│   └── css/                # Stylesheets
├── routes/                 # Extension routes
├── config/                 # Extension configuration
└── database/               # Extension migrations

Extension Example

<?php

namespace Extensions\MyExtension;

use App\Extensions\BaseExtension;

class Extension extends BaseExtension
{
    public function getId(): string
    {
        return 'my-extension';
    }
    
    public function info(): array
    {
        return [
            'name' => 'My Extension',
            'version' => '1.0.0',
            'description' => 'A sample extension',
            'author' => 'Your Name',
        ];
    }
    
    public function providers(): array
    {
        return [
            \Extensions\MyExtension\Providers\MyExtensionServiceProvider::class,
        ];
    }
}

Tech Stack

  • Backend: PHP 8.2+, Laravel 12
  • Frontend: Vue 3, Inertia.js, Ant Design Vue 4, Tailwind CSS 4
  • Database: PostgreSQL 16
  • Runtime: Swoole/RoadRunner (optional)
  • Authentication: Laravel Jetstream + Spatie Permissions
  • Media: Spatie Laravel Media Library

Configuration

Extension Configuration

Extensions can have their own configuration files in extensions/{extension-name}/config/:

// extensions/my-extension/config/settings.php
return [
    'api_endpoint' => env('MY_EXTENSION_API_ENDPOINT', 'https://api.example.com'),
    'cache_ttl' => env('MY_EXTENSION_CACHE_TTL', 3600),
    'features' => [
        'notifications' => env('MY_EXTENSION_NOTIFICATIONS_ENABLED', true),
    ],
];

Environment Variables

Extensions can use their own environment variables in .env.{environment} files within their directories.

API

The CMS provides RESTful APIs with version control:

GET    /api/v1/extensions          # List extensions
POST   /api/v1/extensions/{id}     # Install extension
PUT    /api/v1/extensions/{id}     # Enable/disable extension
DELETE /api/v1/extensions/{id}     # Uninstall extension

Testing

# Run tests
php artisan test

# Run with coverage
php artisan test --coverage

Production Deployment

Using Swoole

# Install Swoole extension
pecl install swoole

# Configure environment
ENABLE_SWOOLE=true
SWOOLE_HTTP_HOST=0.0.0.0
SWOOLE_HTTP_PORT=8080
SWOOLE_HTTP_WORKER_NUM=4

# Start Swoole server
php artisan swoole:http start

Using RoadRunner

# Download RoadRunner
./vendor/bin/rr get

# Start RoadRunner
./rr serve

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments

  • Laravel Framework
  • Vue.js Community
  • Ant Design Vue
  • Spatie Packages

keendigit/laravel-cms 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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