ken/spider-admin

为laravel 5.3制作AdminLTE

安装次数: 77

依赖: 0

建议者: 0

安全性: 0

星标: 2

关注者: 2

分支: 4

开放问题: 0

语言:JavaScript

1.0.2 2016-12-28 16:38 UTC

This package is auto-updated.

Last update: 2024-09-09 09:33:31 UTC


README

#Spider-AdminLTE for laravel 5.3.* a.png

关于Spider-AdminLTE

diaddemi

Spider-AdminLTE是一个用于构建仪表板管理的包,使AdminLTE 2 | Dashboard - Almsaeed Studio成为可能,只需安装此包,您即可获得仪表板管理 AdminLTE 2 | Dashboard - Almsaeed StudioSweetAlert2animate.css
感谢
AdminLTE 2 | Dashboard - Almsaeed Studio
SweetAlert2
animate.css

安装

使用Composer

composer require ken/spider-admin

将服务提供者添加到 config/app.php

'providers' => [
    Ken\SpiderAdmin\SpiderAdminServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class, // laravelcollective/html class
    Intervention\Image\ImageServiceProvider::class, // intervention/image class
]

'aliases' => [
    'Form' => Collective\Html\FormFacade::class,
    'Html' => Collective\Html\HtmlFacade::class,
    'Image' => Intervention\Image\Facades\Image::class,
]

并运行

php artisan vendor:publish
php artisan migrate
composer dump-autoload
php artisan db:seed --class=SpiderSeeder

设置认证模型

在文件 config/auth.php 中打开文件并编辑

'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\User::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],

'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],

设置内核

将此代码放入 App\Http\Kernel.php

protected $routeMiddleware = [
        'spider' => \Ken\SpiderAdmin\App\Http\Middleware\SpiderToRedirect::class,
    ];

使用

您可以为管理菜单应用程序自定义 views/vendor/spider/partials/customize/sidebar-menu.blade.php
您还可以为通知自定义 views/vendor/spider/partials/customize/dropdown.blade.php

如果您创建新的blade,您必须扩展您的文件,例如

@extends('spider::layouts.apps')

@section('content')
    // yours content in here
@endsection

您也可以创建新的JavaScript和CSS文件

@section('css')
    // yours css in here 
@endsection

@section('script')
    // yours script in here 
@endsection

您也可以在 Routes/web.php 中创建新的 Route,没有任何问题。但是,您必须创建路由前缀,例如

<?php 

Route::group(['prefix' => 'spider'] , function() {
   // yours route in here
});

如果您没有更改您的App的路由前缀,或者

<?php 

Route::group(['prefix' => config('spider.config.route_prefix')] , function() {
   // yours route in here
});

如果您更改了您的App的路由前缀

您可以为您的应用程序和路由前缀自定义 config/spider/config.php

<?php

return [
    'title_name'            => 'Spider-AdminLTE',
    'title_name_login'      => 'Spider-AdminLTE',
    'route_prefix'          => 'spider',
    'application_name_mini' => '<b><i>-d</i></b>',
    'application_name'      => '<b>Spider</b><i>-AdminLTE</i>',
    'developer_web'         => 'https://www.diaddemi.web.id',
    'developer_name'        => 'Wahyu Dhira Ashandy'
];

基本

路由基本

localhost:8000/spider

认证基本

基本凭证此应用程序的字段为name或字段email来自表users

username : spider `or` spider@diaddemi.web.id
password : spider 

问题和贡献

只需通过GitHub提交问题或拉取请求。谢谢!