oxenti/tutor

此包的最新版本(dev-master)没有可用的许可证信息。

CakePHP的Tutor插件

维护者

详细信息

github.com/oxenti/Tutor

源代码

问题

安装: 22

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 8

分支: 0

开放问题: 0

类型:cakephp-plugin

dev-master 2016-08-08 18:26 UTC

This package is not auto-updated.

Last update: 2024-09-20 07:40:17 UTC


README

安装

您可以使用composer将此插件安装到您的CakePHP应用程序中。

安装composer包的推荐方法是

composer require oxenti/Tutor

配置

在您的应用配置文件 config/bootstrap.php 中添加

// In config/bootstrap.php
Plugin::load('Tutor');

或者使用cake的控制台

./bin/cake plugin load Tutor

在您的应用配置文件 'config/app.php' 中,将此添加到您的数据源数组中

	'oxenti_tutor' => [
        'className' => 'Cake\Database\Connection',
        'driver' => 'Cake\Database\Driver\Mysql',
        'persistent' => false,
        'host' => 'ỳour_db_host',
        'username' => 'username',
        'password' => 'password',
        'database' => 'databse_name',
        'encoding' => 'utf8',
        'timezone' => 'UTC',
        'cacheMetadata' => true,
        'log' => false,
        'quoteIdentifiers' => false,
    ],
    'test_oxenti_tutor' => [
        'className' => 'Cake\Database\Connection',
        'driver' => 'Cake\Database\Driver\Mysql',
        'persistent' => false,
        'host' => 'ỳour_db_host',
        'username' => 'username',
        'password' => 'password',
        'database' => 'databse_name',
        'encoding' => 'utf8',
        'timezone' => 'UTC',
        'cacheMetadata' => true,
        'log' => false,
        'quoteIdentifiers' => false,
    ],

在您的应用初始文件夹中执行插件的迁移

./bin/cake migrations migrate -p Tutor

配置文件

将插件配置文件 'tutor.php' 从插件的配置文件夹移动到您的应用配置文件夹。

在您的应用 'bootstrap.php' 中添加tutor配置文件

    ...
    try {
        Configure::config('default', new PhpConfig());
        Configure::load('app', 'default', false);
    } catch (\Exception $e) {
        die($e->getMessage() . "\n");
    }

    Configure::load('tutor', 'default');
    ...