selfreliance/adminamazing

Admin for service laravel

1.0.52 2019-03-07 19:15 UTC

README

adminamazing - a package admin with basic roles and basic packages

Require

How to install

Install via composer

composer require selfreliance/adminamazing

Config, Styles

php artisan vendor:publish --provider="Selfreliance\Adminamazing\AdminAmazingServiceProvider" --force

Middleware

Edit model Kernel (App\Http\Kernel)

Add to $routeMiddleware

'CheckAccess' => \Selfreliance\Adminamazing\Middleware\CheckAccess::class,

Blocks

Creating blocks

Blocks need to be created in __construct()

\Blocks::register('name', function(){
	return 'test';
}); // with simple function

\Blocks::register('name', 'className@nameFunction'); // with function from controller/class

Config blocks

Create the 'blocks' parameter in the config file

'blocks' => [
	...
	'nameBlock:directory',
]

Get blocks

\Blocks::get('name'); // get block by name

\Blocks::all(); // get all blocks

Push

Push scripts

@push('scripts')
// any your scripts
@endpush

Push display

@push('display')
// any for display
@endpush