Package Data | |
---|---|
Maintainer Username: | wl496928838 |
Maintainer Contact: | owl.sleeping@yahoo.com (Sleeping Owl) |
Package Create Date: | 2016-06-16 |
Package Last Update: | 2016-06-16 |
Home Page: | http://demo.sleepingowladmin.ru/ |
Language: | JavaScript |
License: | MIT |
Last Refreshed: | 2024-12-20 03:02:35 |
Package Statistics | |
---|---|
Total Downloads: | 15 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Note: 这是开发分支,如果你需要稳定版本,请检出 master branch.
这是一个管理界面生成器,很简单的接入在Laravel.
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
...
"laravelrus/sleepingowl": "4.*@dev"
},
Or composer require laravelrus/sleepingowl:4.*@dev
SleepingOwl\Admin\Providers\SleepingOwlServiceProvider::class,
before Application Service Providers...
to the config/app.php
Example
...
/*
* SleepingOwl Service Provider
*/
SleepingOwl\Admin\Providers\SleepingOwlServiceProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
...
Run this command in the terminal (if you want to know more about what exactly this command does, see install command documentation):
$ php artisan sleepingowl:install
SleepingOwl are compatible with Laravel 5.1. But full performance is not guaranteed.
Installation
section of Laravel 5.2config/sleeping_owl.php
and change 'middleware' => ['web']
to 'middleware' => []
Class has been moved to composer package kodicomponents\support
for using in other projects and methods have been changed for more compatibility.
setAttribute
-> setHtmlAttribute
setAttributes
-> setHtmlAttributes
getAttribute
-> getHtmlAttribute
getAttributes
-> getHtmlAttributes
hasAttribute
-> hasHtmlAttribute
replaceAttribute
-> replaceHtmlAttribute
removeAttribute
-> removeHtmlAttribute
clearAttributes
-> clearHtmlAttributes
hasClass
-> hasClassProperty
Navigation classes have been move to composer package kodicomponents\navigation
for using in other projects.
By default, admin module uses Laravel authentication.
If you want to use auth, you can run artisan command php artisan make:auth
(https://laravel.com/docs/5.2/authentication) and append middleware auth
to config/sleeping_owl.php
If you want to migrate from an older version you can use old auth.
Steps:
config/auth.php
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'administrators' => [
'driver' => 'eloquent',
'model' => SleepingOwl\Admin\Auth\Administrator::class,
],
],
config/auth.php
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'administrators', // change existing provider
],
// or add new
'admin' => [
'driver' => 'session',
'provider' => 'administrators',
],
],
By default auth
middleware use default guard, selected in config/auth.php
'defaults' => [
'guard' => 'web', <- default
...
],
You can change default guard to admin
or change middleware in config/sleeping_owl.php
to
'middleware' => ['web', 'auth:admin'],
You can download the demo project at https://github.com/SleepingOwlAdmin/demo
Admin was written by Sleeping Owl for the Laravel framework and is released under the MIT License. See the LICENSE file for details.