Commit ed97fd8a authored by gxx's avatar gxx

admin 获取全部用户

parent 5ad20132
......@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Contracts\UserServiceContract;
use App\Util\Message;
use Illuminate\Http\Request;
class TestController extends Controller
......@@ -19,5 +20,10 @@ class TestController extends Controller
{
$result = $this->mUser->getAll();
if ($result){
return view('Admin-lte/UserTables',compact('result'));
}else{
return Message::makeError('获取失败');
}
}
}
<?php
use Illuminate\Database\Seeder;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
}
}
......@@ -294,6 +294,9 @@
</div>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
......
@extends('Admin-lte/dashboard')
@section('content')
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
User Tables
<small>advanced tables</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li><a href="#">Tables</a></li>
<li class="active">Data tables</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title">Hover Data Table</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="example2" class="table table-bordered table-hover">
<thead>
<tr>
<th>ID</th>
<th>phone</th>
<th>user_name</th>
<th>real_name</th>
<th>head_icon</th>
<th>gender</th>
<th>eamil</th>
<th>status</th>
<th>操作</th>
</tr>
</thead>
@foreach($result as $value)
<tbody>
<tr>
<td>{{$value['id']}}</td>
<td>{{$value['phone']}}</td>
<td>{{$value['user_name']}}</td>
<td>{{$value['real_name']}}</td>
<td>{{$value['head_icon']}}</td>
<td> {{$value['gender'] == 0 ?'男':'女'}}</td>
<td>{{$value['eamil']}}</td>
<td>{{$value['status']}}</td>
<td> <button >拉黑</button></td>
</tr>
</tbody>
@endforeach
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
@endsection
\ No newline at end of file
......@@ -67,16 +67,16 @@ desired effect
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Page Header
<small>Optional description </small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
<li class="active">Here</li>
</ol>
</section>
{{--<section class="content-header">--}}
{{--<h1>--}}
{{--Page Header--}}
{{--<small>Optional description </small>--}}
{{--</h1>--}}
{{--<ol class="breadcrumb">--}}
{{--<li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>--}}
{{--<li class="active">Here</li>--}}
{{--</ol>--}}
{{--</section>--}}
<!-- Main content -->
<section class="content">
......
......@@ -6,7 +6,7 @@
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>A</b>LT</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>Admin</b>LTE</span>
<span class="logo-lg"><b>Workbiu</b>-admin</span>
</a>
<!-- Header Navbar -->
......
......@@ -12,7 +12,7 @@
<img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p>Alexander Pierce</p>
<p>Geng xingxign</p>
<!-- Status -->
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
</div>
......@@ -34,8 +34,8 @@
<ul class="sidebar-menu">
<li class="header">HEADER</li>
<!-- Optionally, you can add icons to the links -->
<li class="active"><a href="#"><i class="fa fa-link"></i> <span>Link</span></a></li>
<li><a href="#"><i class="fa fa-link"></i> <span>Another Link</span></a></li>
<li class="active"><a href="#"><i class="fa fa-link"></i> <span>用户列表</span></a></li>
<li class="treeview">
<a href="#"><i class="fa fa-link"></i> <span>Multilevel</span>
<span class="pull-right-container">
......
......@@ -40,7 +40,10 @@ Route::get('/home', 'HomeController@index')->name('home');
Route::get('getAll','TestController@getAll');
Route::get('table',function (){
return view('Admin-lte/UserTables');
});
......
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