gromver / yii2-platform
dev-master
2014-12-21 14:15 UTC
Requires
- 2amigos/yii2-selectize-widget: *
- 2amigos/yii2-transliterator-helper: dev-master
- creocoder/yii2-nested-set-behavior: *
- gromver/yii2-models: *
- gromver/yii2-module-query: *
- gromver/yii2-widgets: *
- kartik-v/bootstrap-fileinput: dev-master
- kartik-v/yii2-grid: dev-master
- kartik-v/yii2-helpers: dev-master
- kartik-v/yii2-icons: dev-master
- kartik-v/yii2-mpdf: dev-master
- kartik-v/yii2-widgets: dev-master
- mihaildev/yii2-ckeditor: *
- mihaildev/yii2-elfinder: *
- yiisoft/yii2: *
- yiisoft/yii2-elasticsearch: *
- yiisoft/yii2-imagine: *
- yiisoft/yii2-swiftmailer: *
- zelenin/yii2-rss: dev-master
- zhuravljov/yii2-datetime-widgets: dev-master
This package is not auto-updated.
Last update: 2022-02-01 12:42:07 UTC
README
Grom Platform 允许您在不关注 CMS 实现的情况下开发应用程序。
阅读
平台是在基于 高级应用模板 的情况下开发的,很早就已经很明显,这个应用模板对 Grom Platform 来说是多余的,因此从写下这些文字开始,yii2-platform 的开发已经停止,转而开发可适应 basic application template 的 yii2-platform-basic。在 yii2-platform-basic 项目中,将重点关注移动设备,因此所有有移动应用开发经验的人,请加入项目!请发送邮件至 gromver5@gmail.com,分享你的想法、经验和知识。让我们一起使项目变得更好! :)
演示网站
功能
- 模块:认证、用户、菜单、页面、新闻、标签、搜索、媒体管理器等。
- 新闻的树状分类。
- 内置文档版本控制系统。
- 基于 Elastic Search 的搜索。
- SEO 优化页面地址(URL 重写)
安装##
Cms 基于高级应用模板。安装此应用模板。
Nginx 配置
server { charset utf-8; client_max_body_size 128M; listen 80; ## listen for ipv4 #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 server_name yiicms.proj; root /path/to/app/frontend/web; index index.php; access_log /path/to/app/log/access.log; error_log /path/to/app/log/error.log; # необходимо добавить в папку frontend/web симлинк на backend/web под названием admin location /admin/ { try_files $uri $uri/ /admin/index.php?$args; } location / { # Redirect everything that isn't a real file to index.php try_files $uri $uri/ /index.php?$args; } # uncomment to avoid processing of calls to non-existing static files by Yii location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { try_files $uri =404; } #error_page 404 /404.html; location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; try_files $uri =404; } location ~ /\.(ht|svn|git) { deny all; } }
安装 Grom Platform
通过 composer 运行
php composer.phar require --prefer-dist gromver/yii2-platform "*"
或添加到 composer.json 文件的 require 部分。
"gromver/yii2-platform": "*"
在下面的配置中替换前端、后端和命令行应用程序:
配置 Grom Platform
编辑文件以使用此扩展的相应应用程序:/backend/web/index.php、/frontend/web/index.php、/yii.php
- /backend/web/index.php
$application = new \gromver\platform\backend\Application($config); // yii\web\Application($config);
- /frontend/web/index.php
$application = new \gromver\platform\frontend\Application($config); // yii\web\Application($config);
- /yii.php
$application = new \gromver\platform\console\Application($config); // yii\console\Application($config);
需要编辑标准配置:/frontend/config/main.php、/backend/config/main.php
[
'components' => [
'user' => [
//'identityClass' => 'common\models\User', //закоментировать или удалить эту строку
'enableAutoLogin' => true,
],
]
]
添加数据库表
php yii migrate --migrationPath=@gromver/platform/migrations
连接搜索(可选)
- 安装 Elasticsearch
- 连接 Elasticsearch 搜索模块。配置控制台应用程序,编辑 /console/config/main.php
[
'modules' => [
'grom' => [
'modules' => [
'search' => [
'class' => 'gromver\platform\common\modules\elasticsearch\Module',
'elasticsearchIndex' => 'myapp' //по умолчанию 'cmf'
]
]
]
],
]
前端,编辑 /frontend/config/main.php
[
'modules' => [
'grom' => [
'modules' => [
'search' => [
'class' => 'gromver\platform\frontend\modules\elasticsearch\Module',
'elasticsearchIndex' => 'myapp' //по умолчанию 'cmf'
]
]
]
],
]
后端,编辑 /backend/config/main.php
[
'modules' => [
'grom' => [
'modules' => [
'search' => [
'class' => 'gromver\platform\backend\modules\elasticsearch\Module',
'elasticsearchIndex' => 'myapp' //по умолчанию 'cmf'
]
]
]
],
]
- 应用 Elasticsearch 迁移
php yii migrate --migrationPath=@gromver/platform/migrations/elasticsearch