Commit f95ff869 authored by gxx's avatar gxx

管理员登录页面完成、权限表创建完成

parent 60629c34
...@@ -95,7 +95,7 @@ class StatisticsController extends Controller ...@@ -95,7 +95,7 @@ class StatisticsController extends Controller
$data=[]; $data=[];
foreach ($retentionTime as $key=>$v){ foreach ($retentionTime as $key=>$v){
$data[0][] =$key; $data[0][] =$key;
$data[1][] = ['value'=>$v]; $data[1][] =['value'=>$v,'name'=>$key] ;
} }
return $data; return $data;
} }
......
...@@ -57,5 +57,8 @@ class Kernel extends HttpKernel ...@@ -57,5 +57,8 @@ class Kernel extends HttpKernel
'can' => \Illuminate\Auth\Middleware\Authorize::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'role' => \Zizaco\Entrust\Middleware\EntrustRole::class,
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class,
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class,
]; ];
} }
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Admin extends Model
{
//
}
<?php namespace App;
use Zizaco\Entrust\EntrustPermission;
class Permission extends EntrustPermission
{
}
\ No newline at end of file
...@@ -300,76 +300,128 @@ class StatisticsService implements StatisticsServiceContract ...@@ -300,76 +300,128 @@ class StatisticsService implements StatisticsServiceContract
// 页面存留时间 // 页面存留时间
public function PageRetentionTime() public function PageRetentionTime()
{ {
$userInfo = UserInfo::all(); $userInfo = UserInfo::all();
if(!$userInfo->isEmpty()){ $this-> userCount = count($userInfo);
$a =0;$b=0;$c=0;$d=0;$e=0;$f=0;$g=0;$h=0;$i=0;$j=0;$k=0;$l=0;$m=0;$n=0;$o=0;$p=0; if(!$userInfo->isEmpty()) {
foreach ($userInfo as $info){ $arr =[];
if(count(json_decode($info['page_retention_time'])) >0 ){ foreach ($userInfo as $info) {
if (count(json_decode($info['page_retention_time'])) > 0) {
$pageTime = json_decode($info['page_retention_time']); $pageTime = json_decode($info['page_retention_time']);
foreach ($pageTime as $page){ foreach ($pageTime as $k=> $page) {
if($page->id == 1){
$a += $page->time; $arr[] = $page;
}if($page->id == 2){
$b += $page->time;
}if($page->id == 3){
$c += $page->time;
}if($page->id == 4){
$d += $page->time;
}if($page->id == 5){
$e += $page->time;
}if($page->id == 6){
$f += $page->time;
}if($page->id == 7){
$g += $page->time;
}if($page->id == 8){
$h += $page->time;
}if($page->id == 9){
$i += $page->time;
}if($page->id == 10){
$j += $page->time;
}if($page->id == 11){
$k += $page->time;
}if($page->id == 12){
$l += $page->time;
}if($page->id == 13){
$m += $page->time;
}if($page->id == 14){
$n += $page->time;
}if($page->id == 15){
$o += $page->time;
}if($page->id == 16){
$p += $page->time;
}
} }
} }
} }
}
dd($arr);
// 获取全部用户 return 1;
$users = UserInfo::all()->count();
$invitation = ceil($a / $users);
$timeline = ceil($b / $users);
$project = ceil($c / $users);
$filemanage = ceil($d / $users);
$mine = ceil($e / $users);
$company = ceil($f / $users);
$myteam = ceil($g / $users);
$mission = ceil($h / $users);
$project_item = ceil($i / $users);
$login = ceil($j / $users);
$register = ceil($k / $users);
$discussion = ceil($l / $users);
$mission_settings = ceil($m / $users);
$search_team = ceil($n / $users);
$bangding_phone = ceil($o / $users);
$search_user = ceil($p / $users);
$data =['invitation'=>$invitation,'timeline'=>$timeline,'project'=>$project,'filemanage'=>$filemanage,'mine'=>$mine,'company'=>$company,'myteam'=>$myteam,'mission'=>$mission,'project_item'=>$project_item,'login'=>$login,'register'=>$register,'discussion'=>$discussion,'mission_settings'=>$mission_settings,'search_team'=>$search_team,'bangding_phone'=>$bangding_phone
,'search_user'=>$search_user];
return $data;
}
// $userInfo = UserInfo::all();
// if(!$userInfo->isEmpty()){
// $a =0;$b=0;$c=0;$d=0;$e=0;$f=0;$g=0;$h=0;$i=0;$j=0;$k=0;$l=0;$m=0;$n=0;$o=0;$p=0;
// foreach ($userInfo as $info){
// if(count(json_decode($info['page_retention_time'])) >0 ){
// $pageTime = json_decode($info['page_retention_time']);
// foreach ($pageTime as $page){
// if($page->id == 1){
// $a += $page->time;
// }if($page->id == 2){
// $b += $page->time;
// }if($page->id == 3){
// $c += $page->time;
// }if($page->id == 4){
// $d += $page->time;
// }if($page->id == 5){
// $e += $page->time;
// }if($page->id == 6){
// $f += $page->time;
// }if($page->id == 7){
// $g += $page->time;
// }if($page->id == 8){
// $h += $page->time;
// }if($page->id == 9){
// $i += $page->time;
// }if($page->id == 10){
// $j += $page->time;
// }if($page->id == 11){
// $k += $page->time;
// }if($page->id == 12){
// $l += $page->time;
// }if($page->id == 13){
// $m += $page->time;
// }if($page->id == 14){
// $n += $page->time;
// }if($page->id == 15){
// $o += $page->time;
// }if($page->id == 16){
// $p += $page->time;
// }
//
// }
// }
// }
//
// // 获取全部用户
// $userCount = UserInfo::all()->count();
//
// $invitation = ceil($a / $userCount);
// $timeline = ceil($b / $userCount);
// $project = ceil($c / $userCount);
// $filemanage = ceil($d / $userCount);
// $mine = ceil($e / $userCount);
// $company = ceil($f / $userCount);
// $myteam = ceil($g / $userCount);
// $mission = ceil($h / $userCount);
// $project_item = ceil($i / $userCount);
// $login = ceil($j / $userCount);
// $register = ceil($k / $userCount);
// $discussion = ceil($l / $userCount);
// $mission_settings = ceil($m / $userCount);
// $search_team = ceil($n / $userCount);
// $bangding_phone = ceil($o / $userCount);
// $search_user = ceil($p / $userCount);
//
// $data =['invitation'=>$invitation,'timeline'=>$timeline,'project'=>$project,'filemanage'=>$filemanage,'mine'=>$mine,'company'=>$company,'myteam'=>$myteam,'mission'=>$mission,'project_item'=>$project_item,'login'=>$login,'register'=>$register,'discussion'=>$discussion,'mission_settings'=>$mission_settings,'search_team'=>$search_team,'bangding_phone'=>$bangding_phone
// ,'search_user'=>$search_user];
// return $data;
// }
} }
// 新用户 // 新用户
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d4e3e944fa48764ff2615b64aecbebe5", "content-hash": "1def0056dda5818088690b85958a8aed",
"packages": [ "packages": [
{ {
"name": "dnoegel/php-xdg-base-dir", "name": "dnoegel/php-xdg-base-dir",
...@@ -1128,6 +1128,65 @@ ...@@ -1128,6 +1128,65 @@
], ],
"time": "2017-09-02T17:10:46+00:00" "time": "2017-09-02T17:10:46+00:00"
}, },
{
"name": "orangehill/iseed",
"version": "v2.5.1",
"source": {
"type": "git",
"url": "https://github.com/orangehill/iseed.git",
"reference": "c99a9f7bcc37dd853891acdc2e4d43bcf55a0404"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/orangehill/iseed/c99a9f7bcc37dd853891acdc2e4d43bcf55a0404.zip",
"reference": "c99a9f7bcc37dd853891acdc2e4d43bcf55a0404",
"shasum": ""
},
"require": {
"illuminate/support": "^5.3.8",
"php": ">=5.4.0"
},
"require-dev": {
"illuminate/filesystem": "5.x",
"laravel/framework": "^5.3.8",
"mockery/mockery": "dev-master",
"phpunit/phpunit": "^5.7"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Orangehill\\Iseed\\IseedServiceProvider"
]
}
},
"autoload": {
"psr-0": {
"Orangehill\\Iseed": "src/"
},
"classmap": [
"src/Orangehill/Iseed/Exceptions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Tihomir Opacic",
"email": "tihomir.opacic@orangehilldev.com"
}
],
"description": "Generate a new Laravel database seed file based on data from the existing database table.",
"keywords": [
"artisan",
"generators",
"laravel",
"seed"
],
"time": "2017-10-05T07:30:15+00:00"
},
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
"version": "v2.0.10", "version": "v2.0.10",
......
...@@ -186,6 +186,7 @@ return [ ...@@ -186,6 +186,7 @@ return [
App\Providers\StatisticsServiceProvider::class, App\Providers\StatisticsServiceProvider::class,
Zizaco\Entrust\EntrustServiceProvider::class, Zizaco\Entrust\EntrustServiceProvider::class,
Orangehill\Iseed\IseedServiceProvider::class,
...@@ -241,6 +242,9 @@ return [ ...@@ -241,6 +242,9 @@ return [
'Entrust' => Zizaco\Entrust\EntrustFacade::class, 'Entrust' => Zizaco\Entrust\EntrustFacade::class,
], ],
]; ];
...@@ -67,8 +67,8 @@ return [ ...@@ -67,8 +67,8 @@ return [
'providers' => [ 'providers' => [
'users' => [ 'users' => [
'driver' => 'eloquent', 'driver' => 'eloquent',
'model' => App\User::class, 'model' => App\Models\Admin::class,
'table' => 'users', 'table' => 'admins',
], ],
// 'users' => [ // 'users' => [
......
...@@ -15,6 +15,13 @@ class CreateUserInfosTable extends Migration ...@@ -15,6 +15,13 @@ class CreateUserInfosTable extends Migration
{ {
Schema::create('user_infos', function (Blueprint $table) { Schema::create('user_infos', function (Blueprint $table) {
$table->increments('id'); $table->increments('id');
$table->unsignedInteger('user_id');
$table->string('terminal');
$table->string('manner');
$table->dateTime('last_login_time');
$table->boolean('return_visit')->default(0);
$table->longText('page_retention_time')->nullabel();
$table->longText('user_engagement')->nullabel();
$table->timestamps(); $table->timestamps();
}); });
} }
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admins', function (Blueprint $table) {
$table->increments('id');
$table->string('email');
$table->string('password');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admins');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class EntrustSetupTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// Create table for storing roles
Schema::create('roles', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->string('display_name')->nullable();
$table->string('description')->nullable();
$table->timestamps();
});
// Create table for associating roles to admins (Many-to-Many)
Schema::create('role_admin', function (Blueprint $table) {
$table->integer('admin_id')->unsigned();
$table->integer('role_id')->unsigned();
$table->foreign('admin_id')->references('id')->on('admins')
->onUpdate('cascade')->onDelete('cascade');
$table->foreign('role_id')->references('id')->on('roles')
->onUpdate('cascade')->onDelete('cascade');
$table->primary(['admin_id', 'role_id']);
});
// Create table for storing permissions
Schema::create('permissions', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->string('display_name')->nullable();
$table->string('description')->nullable();
$table->timestamps();
});
// Create table for associating permissions to roles (Many-to-Many)
Schema::create('permission_role', function (Blueprint $table) {
$table->integer('permission_id')->unsigned();
$table->integer('role_id')->unsigned();
$table->foreign('permission_id')->references('id')->on('permissions')
->onUpdate('cascade')->onDelete('cascade');
$table->foreign('role_id')->references('id')->on('roles')
->onUpdate('cascade')->onDelete('cascade');
$table->primary(['permission_id', 'role_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('permission_role');
Schema::drop('permissions');
Schema::drop('role_admin');
Schema::drop('roles');
}
}
...@@ -13,5 +13,6 @@ class DatabaseSeeder extends Seeder ...@@ -13,5 +13,6 @@ class DatabaseSeeder extends Seeder
{ {
// $this->call(UsersTableSeeder::class); // $this->call(UsersTableSeeder::class);
$this->call(UserInfoTableSeeder::class); $this->call(UserInfoTableSeeder::class);
$this->call(UserInfosTableSeeder::class);
} }
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -152,6 +152,9 @@ ...@@ -152,6 +152,9 @@
$('#day').html(data['昨日新增用户占比'] + '%'); $('#day').html(data['昨日新增用户占比'] + '%');
$('#week').html(data['上一周新增用户占比']+ '%'); $('#week').html(data['上一周新增用户占比']+ '%');
$('#month').html(data['上一个月新增用户占比']+ '%'); $('#month').html(data['上一个月新增用户占比']+ '%');
}, },
error:function(data){ error:function(data){
console.log('错误'); console.log('错误');
...@@ -166,9 +169,10 @@ ...@@ -166,9 +169,10 @@
type: 'get', type: 'get',
url: "{{route('statistics.Total')}}", url: "{{route('statistics.Total')}}",
success:function(data){ success:function(data){
optiona['legend']['data'] = data[0]; optiona['legend']['data'] = data[0];
optiona['series'][0]['data']= data[1]; optiona['series'][0]['data']= data[1];
//console.log(optiona['series'][0]['data'])
console.log(optiona['series']);
myChart.setOption(optiona); myChart.setOption(optiona);
}, },
...@@ -184,11 +188,10 @@ ...@@ -184,11 +188,10 @@
type: 'get', type: 'get',
url: "{{route('statistics.RetentionTime')}}", url: "{{route('statistics.RetentionTime')}}",
success:function(data){ success:function(data){
//console.log(data); //console.log(data);
axisData = data[0] page_retention_time['legend']['data'] = data[0];
console.log(page_retention_time) page_retention_time['series'][0]['data']= data[1];
console.log(page_retention_time['xAxis'][0]['data'] = data[0]);
console.log(page_retention_time['series'][0]['data'] = data[1]);
page_retention_time_myChart.setOption(page_retention_time); page_retention_time_myChart.setOption(page_retention_time);
...@@ -206,11 +209,9 @@ ...@@ -206,11 +209,9 @@
type: 'get', type: 'get',
url: "{{route('statistics.UserEngagement')}}", url: "{{route('statistics.UserEngagement')}}",
success:function(data){ success:function(data){
//console.log(data); axisData = data[0]
option_user_engagement['legend']['data'] = data[0] ; option_user_engagement['xAxis'][0]['data'] = data[0];
//console.log(option_user_engagement['series'][0]['data']);
option_user_engagement['series'][0]['data'] = data[1]; option_user_engagement['series'][0]['data'] = data[1];
//console.log(option_user_engagement['series'][0]['data']);
user_engagement_myChart.setOption(option_user_engagement); user_engagement_myChart.setOption(option_user_engagement);
}, },
...@@ -272,57 +273,101 @@ ...@@ -272,57 +273,101 @@
// 折线图
var option_user_engagement = { // var colors = ['#5793f3', '#d14a61', '#675bbaa'];
title : { //
text: '用户参与进度', //
//subtext: '纯属虚构', // var optiona = {
x:'center' // color: colors,
}, //
tooltip : { // tooltip: {
trigger: 'item', // trigger: 'none',
formatter: "{a} <br/>{b} : {c} ({d}%)" // axisPointer: {
}, // type: 'cross'
legend: { // }
orient: 'vertical', // },
left: 'left', // legend: {
data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'] // data:['2015 降水量', '2016 降水量']
}, // },
series : [ // grid: {
{ // top: 70,
name: '访问来源', // bottom: 50
type: 'pie', // },
radius : '55%', // xAxis: [
center: ['50%', '60%'], // {
data:[ // type: 'category',
{value:335, name:'直接访问'}, // axisTick: {
{value:310, name:'邮件营销'}, // alignWithLabel: true
{value:234, name:'联盟广告'}, // },
{value:135, name:'视频广告'}, //
{value:1548, name:'搜索引擎'} // data: ["2016-1", "2016-2", "2016-3", "2016-4", "2016-5", "2016-6", "2016-7", "2016-8", "2016-9", "2016-10", "2016-11", "2016-12"]
], // },
itemStyle: { // {
emphasis: { // type: 'category',
shadowBlur: 10, // axisTick: {
shadowOffsetX: 0, // alignWithLabel: true
shadowColor: 'rgba(0, 0, 0, 0.5)' // },
} //
} // axisPointer: {
} // label: {
] //
// }
}; // },
// data: []
// }
// ],
// yAxis: [
// {
// type: 'value'
//app.title = '坐标轴刻度与标签对齐'; // }
// ],
var page_retention_time = { // series: [
// {
// name:'2015 降水量',
// type:'line',
// xAxisIndex: 1,
// smooth: true,
// data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
// },
// {
// name:'2016 降水量',
// type:'line',
// smooth: true,
// data: [3.9, 5.9, 11.1, 18.7, 48.3, 69.2, 231.6, 46.6, 55.4, 18.4, 10.3, 0.7]
// },
// {
// name:'2017 降水量',
// type:'line',
// smooth: true,
// data: [3.9, 22, 11.1, 18.7, 48.3, 69.2, 444.6, 46.6, 66, 77, 99.3, 0.7]
// },
// {
// name:'2017 降水量',
// type:'line',
// smooth: true,
// data: [3.9, 22, 11.1, 18.7, 555, 69.2, 444.6, 46.6, 66, 77, 99.3, 0.7]
// }
// ]
// };
var option_user_engagement = {
title : { title : {
text: '平均页面停留时间', text: '用户参与进度百分比',
//subtext: '纯属虚构', //subtext: '纯属虚构',
x:'center' x:'center'
}, },
...@@ -342,7 +387,7 @@ ...@@ -342,7 +387,7 @@
xAxis : [ xAxis : [
{ {
type : 'category', type : 'category',
data : ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data : [],
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
} }
...@@ -350,15 +395,15 @@ ...@@ -350,15 +395,15 @@
], ],
yAxis : [ yAxis : [
{ {
type : 'value' type : 'value',
} }
], ],
series : [ series : [
{ {
//name:'直接访问', name:'直接访问',
type:'bar', type:'bar',
barWidth: '60%', barWidth: '60%',
data:[10, 52, 200, 334, 390, 330, 220] data:[]
} }
] ]
}; };
...@@ -369,6 +414,61 @@ ...@@ -369,6 +414,61 @@
var page_retention_time = {
title : {
text: '页面停留时间',
//subtext: '纯属虚构',
x:'center'
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
legend: {
orient: 'vertical',
x: 'left',
data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
},
series: [
{
name:'页面停留时间 单位:s',
type:'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center'
},
emphasis: {
show: true,
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
labelLine: {
normal: {
show: false
}
},
data:[
{value:335, name:'直接访问'},
{value:310, name:'邮件营销'},
{value:234, name:'联盟广告'},
{value:135, name:'视频广告'},
{value:1548, name:'搜索引擎'}
]
}
]
};
......
...@@ -49,6 +49,19 @@ ...@@ -49,6 +49,19 @@
</li> </li>
<li class="treeview">
<a href="#"><i class="fa fa-link"></i> <span>管理员</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="#">管理员列表</a></li>
<li><a href="#">添加管理员</a></li>
</ul>
</li>
<li class="treeview"> <li class="treeview">
<a href="#"><i class="fa fa-link"></i> <span>团队管理</span> <a href="#"><i class="fa fa-link"></i> <span>团队管理</span>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Workbiu-Admin</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css')}}">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/dist/css/AdminLTE.min.css')}}">
<!-- iCheck -->
<link rel="stylesheet" href="{{asset('/bower_components/AdminLTE/plugins/iCheck/square/blue.css')}}">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[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="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<a href="../../index2.html"><b>Workbiu</b>-Admin</a>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Sign in to start your session</p>
<div class="form-group has-feedback">
<form action="{{url('admin/login')}}" method="post" >
{{csrf_field()}}
<input type="email" class="form-control" placeholder="Email" name="email">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Password" name="password">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
<input type="checkbox"> Remember Me
</label>
</div>
</div>
<!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
</div>
<!-- /.col -->
</div>
</form>
</div>
<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
<!-- jQuery 2.2.3 -->
<script src="{{asset('/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{{asset('/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js')}}"></script>
<!-- iCheck -->
<script src="{{asset('/bower_components/AdminLTE/plugins/iCheck/icheck.min.js')}}"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
</script>
</body>
</html>
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Raleway', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@auth
<a href="{{ url('/home') }}">Home</a>
@else
<a href="{{ route('login') }}">Login</a>
<a href="{{ route('register') }}">Register</a>
@endauth
</div>
@endif
<div class="content">
<div class="title m-b-md">
Laravel
</div>
<div class="links">
<a href="https://laravel.com/docs">Documentation</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
</div>
</div>
</div>
</body>
</html>
...@@ -15,6 +15,19 @@ ...@@ -15,6 +15,19 @@
// return view('admin/dashboard'); // return view('admin/dashboard');
//}); //});
// 登录
Route::get('login',function (){
return view('login');
})->name('login');
// 统计 首页 // 统计 首页
Route::get('/','StatisticsController@newUser'); Route::get('/','StatisticsController@newUser');
Route::get('statistics','StatisticsController@newUser'); Route::get('statistics','StatisticsController@newUser');
...@@ -24,8 +37,7 @@ Route::get('admin',function (){ ...@@ -24,8 +37,7 @@ Route::get('admin',function (){
return view('Admin-lte/dashboard'); return view('Admin-lte/dashboard');
}); });
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
// 短信 // 短信
Route::get('sms','SMSController@surplus'); Route::get('sms','SMSController@surplus');
...@@ -97,8 +109,6 @@ Route::group(['prefix'=> 'statistics'],function (){ ...@@ -97,8 +109,6 @@ Route::group(['prefix'=> 'statistics'],function (){
// 权限 // 权限
Route::group(['prefix'=> 'auth'],function (){ Route::group(['prefix'=> 'auth'],function (){
Route::get('getAll','AuthController@getAll')->name('auth.getAll'); Route::get('getAll','AuthController@getAll')->name('auth.getAll');
...@@ -118,6 +128,5 @@ Route::get('table',function (){ ...@@ -118,6 +128,5 @@ Route::get('table',function (){
return view('admin/usertables'); return view('admin/usertables');
}); });
Auth::routes(); //Auth::routes();
//Route::get('/home', 'HomeController@index')->name('home');
Route::get('/home', 'HomeController@index')->name('home');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment