定制 laravolt/epicentrum 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laravolt/epicentrum

最新稳定版本:1.2.0

Composer 安装命令:

composer require laravolt/epicentrum

包简介

Epic central user management for Laravel

README 文档

README

Installation

composer require laravolt/epicentrum

Configuration

Publish configuration file using command:

php artisan vendor:publish --tag=migrations --provider='Laravolt\Epicentrum\ServiceProvider

And there will be file config/laravolt/epicentrum.php and preconfigured config inside it:

<?php
return [
	// setting route
	'route' => [
		'enable' => true,
		'middleware' => ['web', 'auth'],
		'prefix' => 'epicentrum',
	],
	// base layout to extended
	'view' => [
		'layout' => 'ui::layouts.app',
	],
	// setting menu visibility to laravolt/ui
	'menu' => [
		'enable' => true,
	],
	// allow user to has multiple role
	'role' => [
		'multiple' => true,
		'editable' => true,
	],
	// list repository that you can modify
	'repository' => [
		// modify crud of user management
		'user' => \Laravolt\Epicentrum\Repositories\EloquentRepository::class,
		// set default time zone that used
		'timezone' => \Laravolt\Support\Repositories\TimezoneRepository::class,
		// change the criteria on searching feature
		'criteria' => [
			\Prettus\Repository\Criteria\RequestCriteria::class,
		],
		// specify column that can searchable
		'searchable' => ['name', 'email', 'status'],
	],
	'requests' => [
		// modify validation of store data crud
		'account' => [
			'store' => \Laravolt\Epicentrum\Http\Requests\Account\Store::class,
			'update' => \Laravolt\Epicentrum\Http\Requests\Account\Update::class,
			'delete' => \Laravolt\Epicentrum\Http\Requests\Account\Delete::class,
		],
	],
	// change user status available
	'user_available_status' => [
		'PENDING' => 'PENDING',
		'ACTIVE' => 'ACTIVE',
	],
	// specify the model of role
	'models' => [
		'role' => \Laravolt\Acl\Models\Role::class,
	],
	// Whether to auto load migrations or not.
    	// If set to false, then you must publish the migration files first before running the migrate command
    	'migrations' => true,
	// modify table view on user list page
    	'table_view' => \Laravolt\Epicentrum\Table\UserTable::class
];

Custom View File

You can publish views file using:

php artisan vendor:publish --tag=views --provider='Laravolt\Epicentrum\ServiceProvider'

And then, you can modify the view located in resources/views/vendor/epicentrum/*.

The structure of epicentrum view file :

|-- account
|	|-- edit.blade.php
|-- emails
|	|-- account_information.blade.php
|-- my
|	|-- password
|		|-- edit.blade.php
|-- password
|	|-- edit.blade.php
|-- role
|	|-- edit.blade.php
|-- roles
|	|-- create.blade.php
|	|-- edit.blade.php
|	|-- index.blade.php
|-- create.blade.php
|-- edit.blade.php
|-- index.blade.php

FAQ

  • How to override the controller ? Override the controller is not best practice. If you want to pass data into view, you need to use Laravel Blade Service Injection. If you need to change the redirect, you must override the view and make custom route and controller by yourself. And then extends that controller to Epicentrum Controller.

统计信息

  • 总下载量: 8.67k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-14