diff --git a/composer.json b/composer.json index cf857d6..f3901ae 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "moell/laravel-layui-admin", + "name": "maojian/laravel-layui-admin", "description": "基于 Laravel, Layui 构建的 RBAC 后台管理系统。", "keywords": ["laravel", "admin", "layui", "layui admin", "laravel layui admin", "laravel admin"], "type": "library", diff --git a/src/Http/Controllers/IndexController.php b/src/Http/Controllers/IndexController.php index 57ba68f..cb00d98 100644 --- a/src/Http/Controllers/IndexController.php +++ b/src/Http/Controllers/IndexController.php @@ -7,6 +7,6 @@ class IndexController extends Controller { public function index() { - return view("admin::layouts.admin"); + return view("admin::index"); } } \ No newline at end of file diff --git a/src/Providers/LayuiAdminServiceProvider.php b/src/Providers/LayuiAdminServiceProvider.php index 5e94efc..acf3e53 100644 --- a/src/Providers/LayuiAdminServiceProvider.php +++ b/src/Providers/LayuiAdminServiceProvider.php @@ -45,8 +45,9 @@ public function register() private function viewComposer() { View::composer( - 'admin::layouts.admin', 'Moell\LayuiAdmin\ViewComposers\AdminComposer' + 'admin::index', 'Moell\LayuiAdmin\ViewComposers\AdminComposer' ); + view()->share('siteName' ,'nft'); } private function registerMigrations() diff --git a/views/admin_user/index.blade.php b/views/admin_user/index.blade.php index 3f0a00c..6821539 100644 --- a/views/admin_user/index.blade.php +++ b/views/admin_user/index.blade.php @@ -1,6 +1,6 @@ @section("title", "管理员管理") -@extends("admin::layouts.admin") +@extends("admin::public.layout") @section("breadcrumb")
diff --git a/views/index.blade.php b/views/index.blade.php new file mode 100644 index 0000000..cf90ec0 --- /dev/null +++ b/views/index.blade.php @@ -0,0 +1,110 @@ + + + + + + + + @yield('title') + + + + + + + + +
+ +
+ +
    +
  • + +
  • +
  • + +
  • +
+ +
+ +
+
+
    + @foreach ($navigation as $vo) +
  • + @if ($vo['uri'] == "/admin/index") + {{$vo['name']}} + @else + {{$vo['name']}} + @endif + @if (isset($vo['children']) && !empty($vo['children'])) +
    + @foreach ($vo['children'] as $k => $v) +
    {{$v['name']}}
    + @endforeach +
    + @endif +
  • + @endforeach +
+
+
+ + +
+ + +
+ + +
+
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/views/layouts/admin.blade.php b/views/layouts/admin.blade.php deleted file mode 100644 index b1d4226..0000000 --- a/views/layouts/admin.blade.php +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - @yield('title') - - - - -
- - -
-
- - -
-
- -
- @yield("breadcrumb") -
-
-
- @include('admin::message') -
- @yield("content") -
-
-
-
-
- - -
- - -@yield("script") - - - \ No newline at end of file diff --git a/views/navigation/index.blade.php b/views/navigation/index.blade.php index 6fb44ce..4c4071c 100644 --- a/views/navigation/index.blade.php +++ b/views/navigation/index.blade.php @@ -1,6 +1,6 @@ @section("title", "导航菜单") -@extends("admin::layouts.admin") +@extends("admin::public.layout") @section("breadcrumb")
diff --git a/views/permission/index.blade.php b/views/permission/index.blade.php index 682c30e..d892f3f 100644 --- a/views/permission/index.blade.php +++ b/views/permission/index.blade.php @@ -1,6 +1,6 @@ @section("title", "角色") -@extends("admin::layouts.admin") +@extends("admin::public.layout") @section("breadcrumb")
diff --git a/views/permission_group/index.blade.php b/views/permission_group/index.blade.php index 3a66487..0471714 100644 --- a/views/permission_group/index.blade.php +++ b/views/permission_group/index.blade.php @@ -1,6 +1,6 @@ @section("title", "权限组") -@extends("admin::layouts.admin") +@extends("admin::public.layout") @section("breadcrumb")
diff --git a/views/public/404.blade.php b/views/public/404.blade.php new file mode 100644 index 0000000..d1d5e79 --- /dev/null +++ b/views/public/404.blade.php @@ -0,0 +1,62 @@ + + + +@include("public.header") + + +
+ +
+

404

+

哎呦,您访问的页面不存在(⋟﹏⋞)

+ +
+
+ + + +@include("public.footer") + + diff --git a/views/public/admin.blade.php b/views/public/admin.blade.php new file mode 100644 index 0000000..2067d83 --- /dev/null +++ b/views/public/admin.blade.php @@ -0,0 +1,107 @@ + + + + + + + + @yield('title') + + + + + + + +
+ + +
+
+ + +
+
+
+
+
+
+
+ +
+
    +
  • +
+
+
+
+ +
+ + +
+ + + + + \ No newline at end of file diff --git a/views/public/crumb.blade.php b/views/public/crumb.blade.php new file mode 100644 index 0000000..f17e3fc --- /dev/null +++ b/views/public/crumb.blade.php @@ -0,0 +1,10 @@ + +
+ + + 首页/ + 系统管理/ + 查看 + +
+ \ No newline at end of file diff --git a/views/public/footer.blade.php b/views/public/footer.blade.php new file mode 100644 index 0000000..e69de29 diff --git a/views/public/form.blade.php b/views/public/form.blade.php new file mode 100644 index 0000000..01732ea --- /dev/null +++ b/views/public/form.blade.php @@ -0,0 +1,11 @@ + + + +@include("admin.public.header") + + +@yield('content') + +@include("admin.public.footer") + + diff --git a/views/public/header.blade.php b/views/public/header.blade.php new file mode 100644 index 0000000..a883d0e --- /dev/null +++ b/views/public/header.blade.php @@ -0,0 +1,27 @@ + + + + + {{$siteName}} | {{ Config::get('app.name') }} + + + + + + + + + + + + + diff --git a/views/public/layout.blade.php b/views/public/layout.blade.php new file mode 100644 index 0000000..b309a46 --- /dev/null +++ b/views/public/layout.blade.php @@ -0,0 +1,24 @@ + + + +@include("admin::public.header") + + + +@include("admin::public.crumb") + + +
+
+
+ + @yield('content') +
+
+
+ +@yield('script') + +@include("admin::public.footer") + + diff --git a/views/role/assign_permission.blade.php b/views/role/assign_permission.blade.php index a571da9..0bcc460 100644 --- a/views/role/assign_permission.blade.php +++ b/views/role/assign_permission.blade.php @@ -1,6 +1,6 @@ @section("title", "分配权限") -@extends("admin::layouts.admin") +@extends("admin::public.layout") @section("breadcrumb")
diff --git a/views/role/index.blade.php b/views/role/index.blade.php index 27a710d..4d7fd63 100644 --- a/views/role/index.blade.php +++ b/views/role/index.blade.php @@ -1,6 +1,6 @@ @section("title", "角色") -@extends("admin::layouts.admin") +@extends("admin::public.layout") @section("breadcrumb")