laramod / admin-core

LaraMod Admin Core

0.5.2 2017-07-10 15:50 UTC

This package is not auto-updated.

Last update: 2024-09-15 03:34:21 UTC


README

LaraMod 是一个基于 Laravel 的模块化 CMS。 https://github.com/LaraModulus

警告:在 v1 版本之前,将没有向后兼容性,某些版本可能需要迁移:刷新

安装

composer require laramod/admin-core

config/app.php

'providers' => [
    ...
    LaraMod\Admin\Core\AdminCoreServiceProvider::class
]

config/app.php 默认情况下,LaraMod 使用英语作为语言。如果您需要多个地区,您可以在 config/app.php 中定义它,'fallback_locale' 作为默认地区使用。

'locales' => ['en'],

config/auth.php

'guards' => [
        ...
        'admin' => [
            'driver' => 'session',
            'provider' => 'admins'
        ]
    ],
'providers' => [
        ...
        'admins' => [
            'driver' => 'eloquent',
            'model' => \LaraMod\Admin\Core\Models\Admin::class
        ]
    ],
'passwords' => [
        ...
        'admins' => [
            'provider' => 'admins',
            'email' => 'auth.emails.password',
            'table' => 'admin_password_resets',
            'expire' => 60,
        ]
    ],

app/Http/Kernel.php

protected $middlewareGroups = [
        ...
        'admin' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
        ]
    ];
protected $routeMiddleware = [
        ...
        'auth.admin' => \LaraMod\Admin\Core\Middleware\Authenticate::class,
    ];

发布配置文件

php artisan vendor:publish --tag="config"

config/admincore.php 中,您可以编辑管理菜单

发布资产

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

发布迁移

php artisan vendor:publish --tag="migrations"

DEMO: http://laramod.novaspace.eu/admin

user: admin@admin.com
pass: admin