mmi/mmi-cms-standard 问题修复 & 功能扩展

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

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

mmi/mmi-cms-standard

最新稳定版本:2.0.0

Composer 安装命令:

composer create-project mmi/mmi-cms-standard

包简介

MMi Framework project with CMS - standard edition

README 文档

README

A standard project skeleton for building applications on top of MMi CMS — a PHP content management system built on the MMi Framework.

Requirements

  • PHP 8.5+
  • Composer
  • SQLite (default) or a supported PDO-compatible database

Getting started

Option 1: PHP built-in server (quickest)

cp .env.dist .env   # if applicable — edit values as needed
make up

This will:

  1. Run composer install
  2. Set write permissions on var/
  3. Create var/db.sqlite
  4. Run database migrations (bin/mmi Mmi:DbDeploy)
  5. Start the PHP CLI server at http://127.0.0.1:8080

Option 2: Docker + Apache

make docker-up

This builds the image, starts the container (Apache on port 8080), installs dependencies, sets up the database and drops you into a bash shell inside the container. The project root is volume-mounted at /var/www/html.

Stop and remove the container:

make docker-down

Configuration

All runtime configuration is in .env. Key variables:

Variable Default Description
APP_DEBUG_ENABLED 1 Enable debug mode
APP_BASE_URL (empty) Base URL override
APP_VIEW_CDN (empty) CDN prefix for assets
CMS_AUTH_SALT Set this to a random secret
CMS_LANG_DEFAULT en Default language
CMS_THUMB_QUALITY 80 JPEG thumbnail quality
DB_DRIVER sqlite Database driver
DB_HOST ./var/db.sqlite DB host or path (SQLite)
CACHE_SYSTEM_ENABLED 0 System cache on/off
CACHE_PUBLIC_ENABLED 0 Public cache on/off

For Docker, change DB_HOST to /app/var/db.sqlite (see the comment in .env).

Project structure

src/App/
  AppRouterConfig.php     # Extend to add custom routes
  AppSkinsetConfig.php    # Register skin(set) configs here
  di.app.php              # DI container bindings
etc/apache2/              # Apache vhost config (used by Docker)
var/                      # Runtime data — writable by the web server
  cache/
  data/
  db.sqlite
  log/
  session/
bin/mmi                   # CLI entry point

CLI

bin/mmi <Command>:<action>

Useful commands:

bin/mmi Mmi:DbDeploy      # Run pending database migrations
bin/mmi Mmi:Cache:Clean   # Clear all caches

Extending the application

Adding routes

Extend AppRouterConfig in src/App/AppRouterConfig.php:

class AppRouterConfig extends CmsRouterConfig
{
    public function __construct()
    {
        parent::__construct();
        $this->addRoute(new \Mmi\Mvc\RouterConfig\Route(...));
    }
}

Adding skins/templates

Register a skin in src/App/AppSkinsetConfig.php:

public function __construct()
{
    $this->addSkin(new MySkinConfig());
}

Dependency injection

Add or override services in src/App/di.app.php:

return [
    RouterConfig::class => create(AppRouterConfig::class),
    // add your own bindings here
];

License

MIT

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: Makefile

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固