jameron/admin
Composer 安装命令:
composer create-project jameron/admin
包简介
Admin panel for mananging users, roles, and permissions.
关键字:
README 文档
README
This package has been built to work with Laravel 5.4.33 and later. Some older versions may not be compatible. If you are starting fresh, create your laravel application first thing and install the regulator package.
- Add the package to your compose.json file:
"jameron/admin": "*",
composer update
**NOTE Laravel 5.5+ users there is auto-discovery so you can ignore steps 2 and 3
- Update your providers:
Jameron\Admin\AdminServiceProvider::class,
- Update your Facades:
'Admin' => Jameron\Admin\Facades\RegulatorFacade::class,
- Publish the config: (this moves the config file from the vendor directory to the laravel config/ directory)
php artisan vendor:publish
- Install Bootstrap 4 and Popper.js (Bootstrap needs popper.js)
First uninstall that old bootstrap 3 sass
npm uninstall --save bootstrap-sass
Then install bootstrap 4 and its dependency popper.js
npm install popper.js --save
npm install bootstrap@4.0.0-beta.2 --save
open up resources/assets/js/bootstrap.js and add this line after Jquery before bootstrap:
window.Popper = require('popper.js').default;
- Update the layout file both of these views:
resources/views/auth/login.blade.php
resources/views/auth/register.blade.php
to use
@extends('admin::layouts.app')
Optionally if you would like to use the Admin Bootstrap 4 login form delete the form that comes with Laravel and add in the Admin sign_in view partial in the container. The login.blade file might look like this:
@extends('admin::layouts.app') @section('content') <div class="container"> @include('admin::partials.forms.sign_in') </div> @endsection
- Update webpack config
.js('resources/assets/admin/js/AdminDependencies.js', 'public/js/Admin.js') .sass('resources/assets/admin/sass/admin.scss', 'public/css')
- Update your resources/assets/scss/app.scss
@import "~bootstrap/scss/bootstrap"; @import "~font-awesome/scss/font-awesome";
- If you want a sidenav bar you can edit the config/admin.php file with your buttons list on a per role basis, don't forget that you may need to run
php artisan config:cachewhen you make changes.
To add the side nav bar to your view file insert the partial like so:
@include('admin::partials.utils._side_nav', [ 'buttons' => ( Auth::check() && Auth::user()->roles()->first() && isset(config('admin.side_nav.roles')[Auth::user()->roles()->first()->slug]['buttons']) ) ? config('admin.side_nav.roles')[Auth::user()->roles()->first()->slug]['buttons'] : [] ])
- Update your reset password view file to use the bootstrap 4 version provided by this package
Delete everything between the @section @endsection and make sure that the view layout you extend uses the admin namespace and you import the bootstrap 4 reset password html in the partial.
The finished file should look like this:
@extends('admin::layouts.app') @section('content') @include('admin::partials.auth.passwords.email') @endsection
Update your reset password form view file:
@extends('admin::layouts.app') @section('content') @include('admin::partials.auth.passwords.reset') @endsection
- Update your PasswordController redirect to path.
app/Http/Controllers/Auth/ResetPasswordController
protected $redirectTo = '/dash';
- Update your paginator class to use Bootstrap 4
php artisan vendor:publish
Select the option that shows this:
Illuminate\Pagination\PaginationServiceProvider
Then open up your bootsstrap/app.php and add these lines:
Illuminate\Pagination\AbstractPaginator::defaultView("pagination::bootstrap-4"); Illuminate\Pagination\AbstractPaginator::defaultSimpleView("pagination::simple-bootstrap-4");
in you resources/views/vendor/bootstrap-4.blade.php file update this line to this:
<ul class="pagination @if(config('admin.theme')=='dark')pagination-dark @endif">
jameron/admin 适用场景与选型建议
jameron/admin 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 125 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「admin」 「regulator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jameron/admin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jameron/admin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jameron/admin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
Smile Retailer Admin
AdminLTE backend theme asset bundle for Yii 2.0 Framework with Bootstrap 4
This bundle provides a friendly view to display roles administration.
统计信息
- 总下载量: 125
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2017-11-07