Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.1 #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ class IndexController extends Controller
{
public function index()
{
return view("admin::layouts.admin");
return view("admin::index");
}
}
3 changes: 2 additions & 1 deletion src/Providers/LayuiAdminServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion views/admin_user/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@section("title", "管理员管理")

@extends("admin::layouts.admin")
@extends("admin::public.layout")

@section("breadcrumb")
<div class="admin-breadcrumb">
Expand Down
110 changes: 110 additions & 0 deletions views/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>@yield('title')</title>
<link href="/static/admin/assets/images/favicon.ico" rel="icon">
<link rel="stylesheet" href="/static/admin/assets/libs/layui/css/layui.css" />
<link rel="stylesheet" href="/static/admin/assets/module/admin.css?v=318" />
<link rel="stylesheet" href="/static/admin/assets/css/theme-all.css?v=318" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<!-- 头部 -->
<div class="layui-header">
<div class="layui-logo">{{ config("admin.system_name") }}</div>
<ul class="layui-nav layui-layout-left">
<li class="layui-nav-item" lay-unselect>
<a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
</li>
<li class="layui-nav-item" lay-unselect>
<a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
</li>
</ul>
<ul class="layui-nav layui-layout-right">
<li class="layui-nav-item layui-hide-xs" lay-unselect>
<a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
</li>
<li class="layui-nav-item layui-hide-xs" lay-unselect>
<a ew-event="lockScreen" title="锁屏"><i class="layui-icon layui-icon-password"></i></a>
</li>
<li class="layui-nav-item" lay-unselect>
<a>
<img src="@if (!empty($adminInfo['avatar_url'])) {{$adminInfo['avatar_url']}} @else /static/admin/assets/images/logo.png @endif" class="layui-nav-img">
</a>
<dl class="layui-nav-child">
<dd><a onclick="admin.openLayerForm('{{ route("admin.change-password-form") }}', '修改密码', 'PATCH', '500px', '300px')">修改密码</a></dd>
<dd><a href="{{ route("admin.logout") }}">退出登录</a></dd>
</dl>
</li>
<li class="layui-nav-item" lay-unselect>
<a ew-event="theme" title="主题"><i class="layui-icon layui-icon-more-vertical"></i></a>
</li>
</ul>
</div>
<!-- 侧边栏 -->
<div class="layui-side">
<div class="layui-side-scroll">
<ul class="layui-nav layui-nav-tree " lay-filter="admin-side-nav" lay-shrink="_all" style="margin: 15px 0;">
@foreach ($navigation as $vo)
<li class="layui-nav-item">
@if ($vo['uri'] == "/admin/index")
<a lay-href="/admin/index"><i class="layui-icon {{$vo['icon']}}"></i>&emsp;<cite>{{$vo['name']}}</cite></a>
@else
<a ><i class="layui-icon {{$vo['icon']}}"></i>&emsp;<cite>{{$vo['name']}}</cite></a>
@endif
@if (isset($vo['children']) && !empty($vo['children']))
<dl class="layui-nav-child">
@foreach ($vo['children'] as $k => $v)
<dd><a lay-href="{{$v['uri']}}">{{$v['name']}}</a></dd>
@endforeach
</dl>
@endif
</li>
@endforeach
</ul>
</div>
</div>

<!-- 主体部分 -->
<div class="layui-body"></div>
<!-- 底部 -->
<div class="layui-footer layui-text">
copyright © 2018~2024 <a href="https://www.rxthink.cn" target="_blank">rxthink.cn</a> all rights reserved.
<span class="pull-right"></span>
</div>
</div>

<!-- 加载动画 -->
<div class="page-loading">
<div class="ball-loader">
<span></span><span></span><span></span><span></span>
</div>
</div>

<!-- js部分 -->
<script type="text/javascript" src="/static/admin/assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="/static/admin/assets/js/common.js?v=318"></script>
<script>
layui.use(['index'], function() {
var $ = layui.jquery;
var index = layui.index;
// 默认加载主页
index.loadHome({
menuPath: '/admin/nft',
menuName: '<i class="layui-icon layui-icon-home"></i>'
});

});
</script>
</body>

</html>
85 changes: 0 additions & 85 deletions views/layouts/admin.blade.php

This file was deleted.

2 changes: 1 addition & 1 deletion views/navigation/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@section("title", "导航菜单")

@extends("admin::layouts.admin")
@extends("admin::public.layout")

@section("breadcrumb")
<div class="admin-breadcrumb">
Expand Down
2 changes: 1 addition & 1 deletion views/permission/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@section("title", "角色")

@extends("admin::layouts.admin")
@extends("admin::public.layout")

@section("breadcrumb")
<div class="admin-breadcrumb">
Expand Down
2 changes: 1 addition & 1 deletion views/permission_group/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@section("title", "权限组")

@extends("admin::layouts.admin")
@extends("admin::public.layout")

@section("breadcrumb")
<div class="admin-breadcrumb">
Expand Down
62 changes: 62 additions & 0 deletions views/public/404.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<!-- 引入头部 -->
@include("public.header")
<body>
<!-- 正文开始 -->
<div class="error-page">
<img class="error-page-img" src="/static/admin/assets/images/ic_404.png">
<div class="error-page-info">
<h1>404</h1>
<p>哎呦,您访问的页面不存在(⋟﹏⋞)</p>
<div>
<a ew-href="/main/index" class="layui-btn">返回首页</a>
</div>
</div>
</div>
<style>
.error-page {
position: absolute;
top: 50%;
width: 100%;
text-align: center;
-o-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}

.error-page .error-page-img {
display: inline-block;
height: 260px;
margin: 10px 15px;
}

.error-page .error-page-info {
vertical-align: middle;
display: inline-block;
margin: 10px 15px;
}

.error-page .error-page-info > h1 {
color: #434e59;
font-size: 72px;
font-weight: 600;
}

.error-page .error-page-info > p {
color: #777;
font-size: 20px;
margin-top: 5px;
}

.error-page .error-page-info > div {
margin-top: 30px;
}
</style>

<!-- 引入脚部 -->
@include("public.footer")
</body>
</html>
Loading