wewerenext/next-cms

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

该软件包的官方仓库似乎已不存在,因此该软件包已被冻结。

dev-master 2017-04-25 10:01 UTC

This package is not auto-updated.

Last update: 2019-04-29 01:56:43 UTC


README

Next

Next CMS

安装

Next CMS 可以通过简单地将 服务提供者 添加到您的项目配置文件 app.php 中,集成到任何 Laravel 5.1 项目中。

要下载 CMS 软件包并将其添加到您的 Composer 依赖项列表中,请运行此命令

composer require wewerenext/next-cms

将此提供者添加到您的 Laravel 项目的 config/app.php 文件中,在 'providers' => [ 数组末尾

        Wearenext\CMS\ServiceProvider::class,
    ],

重要:在文件末尾靠近 'aliases' => [ 数组的位置添加这两行

        'CMSHtml'   => Wearenext\CMS\Support\Facades\HtmlFacade::class,
        'CMSForm'   => Wearenext\CMS\Support\Facades\FormFacade::class,
    ],

最后一步是将所有数据库迁移和公开的资产发布到您的 Laravel 项目中。运行这两个命令,并可选择将它们提交到您的项目代码库中

php artisan vendor:publish --tag=database
php artisan vendor:publish --tag=public

定制

可以在 CMS 中通过覆盖 config/cms.php 中设置的配置指令来修改可定制的属性。默认配置文件看起来像这样

return [
    'group' => [
        'prefix' => 'admin', // You can access the CMS by appending /admin to your projects URL
    ],
    'brand' => [
        'color' => '#737373', // Color in menu bar
        'title' => 'Wearenext-CMS',  // Brand name in menu bar
    ],
    'auth' => [
        'middleware' => 'auth', // How authentication is checked for protected routes
    ],
];

测试

您可以通过运行以下两个 Composer 脚本之一来扫描源代码中的大多数错误,包括 PSR 遵守性

composer test-source # Scan for PSR and PHP errors
composer test # Scan for errors and run phpunit tests