Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
workbiu-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gxx
workbiu-admin
Commits
4f7303da
Commit
4f7303da
authored
Sep 30, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示团队成员
parent
62bc088e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
170 additions
and
116 deletions
+170
-116
UserController.php
app/Http/Controllers/UserController.php
+1
-4
Group.php
app/Models/Group.php
+6
-0
UserGroup.php
app/Models/UserGroup.php
+9
-0
GroupService.php
app/Services/GroupService.php
+14
-0
groupinformation.blade.php
resources/views/admin/group/groupinformation.blade.php
+39
-111
userlike.blade.php
resources/views/admin/user/userlike.blade.php
+100
-0
usertables.blade.php
resources/views/admin/usertables.blade.php
+1
-1
No files found.
app/Http/Controllers/UserController.php
View file @
4f7303da
...
@@ -20,9 +20,6 @@ class UserController extends Controller
...
@@ -20,9 +20,6 @@ class UserController extends Controller
}
}
public
function
updatePage
(
$id
)
public
function
updatePage
(
$id
)
{
{
$result
=
$this
->
mUser
->
get
(
$id
);
$result
=
$this
->
mUser
->
get
(
$id
);
...
@@ -107,7 +104,7 @@ class UserController extends Controller
...
@@ -107,7 +104,7 @@ class UserController extends Controller
$search_content
=
$request
->
search
;
$search_content
=
$request
->
search
;
$page
=
1
;
$page
=
1
;
$result
=
$this
->
mUser
->
simpleSearch
(
$search_content
,
$page
);
$result
=
$this
->
mUser
->
simpleSearch
(
$search_content
,
$page
);
return
view
(
'admin/user
tables
'
,[
'result'
=>
$result
,
'params'
=>
$search_content
]);
return
view
(
'admin/user
/userlike
'
,[
'result'
=>
$result
,
'params'
=>
$search_content
]);
}
}
}
}
app/Models/Group.php
View file @
4f7303da
...
@@ -19,4 +19,10 @@ class Group extends Model
...
@@ -19,4 +19,10 @@ class Group extends Model
public
function
owner
(){
public
function
owner
(){
return
$this
->
belongsTo
(
'App\Models\User'
,
'owner_id'
);
return
$this
->
belongsTo
(
'App\Models\User'
,
'owner_id'
);
}
}
public
function
usergroup
()
{
return
$this
->
hasMany
(
'App\Models\UserGroup'
,
'group_id'
);
}
}
}
app/Models/UserGroup.php
View file @
4f7303da
...
@@ -7,5 +7,14 @@ use Illuminate\Database\Eloquent\Model;
...
@@ -7,5 +7,14 @@ use Illuminate\Database\Eloquent\Model;
class
UserGroup
extends
Model
class
UserGroup
extends
Model
{
{
public
function
users
()
{
return
$this
->
hasMany
(
'App\Models\User'
,
'id'
,
'user_id'
);
}
public
function
groups
()
{
return
$this
->
hasMany
(
'App\Models\Group'
,
'id'
,
'group_id'
);
}
}
}
app/Services/GroupService.php
View file @
4f7303da
...
@@ -91,6 +91,20 @@ class GroupService implements GroupServiceContract
...
@@ -91,6 +91,20 @@ class GroupService implements GroupServiceContract
public
function
get
(
$group_id
)
public
function
get
(
$group_id
)
{
{
$group
=
Group
::
find
(
$group_id
);
$group
=
Group
::
find
(
$group_id
);
// $groups = Group::find($group_id)->usergroup;
//
// foreach ($groups as $v)
// {
// echo ($v->users[0]['user_name']);
// }
//
// dd($group);
if
(
$group
==
null
){
if
(
$group
==
null
){
return
null
;
return
null
;
}
else
{
}
else
{
...
...
resources/views/admin/group/groupinformation.blade.php
View file @
4f7303da
...
@@ -94,124 +94,52 @@
...
@@ -94,124 +94,52 @@
<
div
class
=
"col-md-9"
>
<
div
class
=
"col-md-9"
>
<
div
class
=
"nav-tabs-custom"
>
<
div
class
=
"nav-tabs-custom"
>
<
ul
class
=
"nav nav-tabs"
>
<
ul
class
=
"nav nav-tabs"
>
<
li
class
=
"active"
><
a
href
=
"#activity"
data
-
toggle
=
"tab"
>
Activity
</
a
></
li
>
<
li
class
=
"active"
><
a
href
=
"#activity"
data
-
toggle
=
"tab"
>
团队成员
</
a
></
li
>
<
li
><
a
href
=
"#timeline"
data
-
toggle
=
"tab"
>
Timeline
</
a
></
li
>
<
li
><
a
href
=
"#timeline"
data
-
toggle
=
"tab"
>
Timeline
</
a
></
li
>
<
li
><
a
href
=
"#settings"
data
-
toggle
=
"tab"
>
Settings
</
a
></
li
>
<
li
><
a
href
=
"#settings"
data
-
toggle
=
"tab"
>
Settings
</
a
></
li
>
</
ul
>
</
ul
>
<
div
class
=
"tab-content"
>
<
div
class
=
"tab-content"
>
<
div
class
=
"active tab-pane"
id
=
"activity"
>
<
div
class
=
"active tab-pane"
id
=
"activity"
>
<!--
Post
-->
<
div
class
=
"post"
>
<
div
class
=
"user-block"
>
@
foreach
(
$groups
->
usergroup
as
$user
)
<
img
class
=
"img-circle img-bordered-sm"
src
=
"../../dist/img/user1-128x128.jpg"
alt
=
"user image"
>
<
span
class
=
"username"
>
<
a
href
=
"#"
>
Jonathan
Burke
Jr
.</
a
>
<
div
class
=
"box box-primary"
style
=
"width:500px;"
>
<
a
href
=
"#"
class
=
"pull-right btn-box-tool"
><
i
class
=
"fa fa-times"
></
i
></
a
>
<
div
class
=
"box-body box-profile"
>
</
span
>
<
span
class
=
"description"
>
Shared
publicly
-
7
:
30
PM
today
</
span
>
</
div
>
<
img
class
=
"profile-user-img img-responsive img-circle"
src
=
"
{
{url('storage/1.jpg')}
}
"
alt
=
"User profile picture"
>
<!--
/.
user
-
block
-->
<
p
>
<
h3
class
=
"profile-username text-center"
>
Logo
</
h3
>
Lorem
ipsum
represents
a
long
-
held
tradition
for
designers
,
typographers
and
the
like
.
Some
people
hate
it
and
argue
for
its
demise
,
but
others
ignore
the
hate
as
they
create
awesome
{{
--<
p
class
=
"text-muted text-center"
>
Software
Engineer
</
p
>--
}}
tools
to
help
create
filler
text
for
everyone
from
bacon
lovers
to
Charlie
Sheen
fans
.
<
ul
class
=
"list-group list-group-unbordered"
>
</
p
>
<
li
class
=
"list-group-item"
>
<
ul
class
=
"list-inline"
>
<
b
>
成员名称
</
b
>
<
a
class
=
"pull-right"
>
{{
$user
->
users
[
0
][
'user_name'
]}}
</
a
>
<
li
><
a
href
=
"#"
class
=
"link-black text-sm"
><
i
class
=
"fa fa-share margin-r-5"
></
i
>
Share
</
a
></
li
>
</
li
>
<
li
><
a
href
=
"#"
class
=
"link-black text-sm"
><
i
class
=
"fa fa-thumbs-o-up margin-r-5"
></
i
>
Like
</
a
>
<
li
class
=
"list-group-item"
>
</
li
>
<
b
>
性别
:
</
b
>
<
a
class
=
"pull-right"
>
{{
$user
->
users
[
0
][
'user_name'
]
==
0
?
'男'
:
'女'
}}
</
a
>
<
li
class
=
"pull-right"
>
</
li
>
<
a
href
=
"#"
class
=
"link-black text-sm"
><
i
class
=
"fa fa-comments-o margin-r-5"
></
i
>
Comments
<
li
class
=
"list-group-item"
>
(
5
)
</
a
></
li
>
<
b
>
邮箱
:
</
b
>
<
a
class
=
"pull-right"
>
{{
$user
->
users
[
0
][
'email'
]
==
''
?
'邮箱暂无'
:
$user
->
users
[
0
][
'email'
]}}
</
a
>
</
ul
>
</
li
>
</
ul
>
<
input
class
=
"form-control input-sm"
type
=
"text"
placeholder
=
"Type a comment"
>
</
div
>
<!--
/.
post
-->
<
a
href
=
"#"
class
=
"btn btn-primary btn-block"
><
b
>
关注
</
b
></
a
>
<!--
Post
-->
<
div
class
=
"post clearfix"
>
<
div
class
=
"user-block"
>
<
img
class
=
"img-circle img-bordered-sm"
src
=
"../../dist/img/user7-128x128.jpg"
alt
=
"User Image"
>
<
span
class
=
"username"
>
<
a
href
=
"#"
>
Sarah
Ross
</
a
>
<
a
href
=
"#"
class
=
"pull-right btn-box-tool"
><
i
class
=
"fa fa-times"
></
i
></
a
>
</
span
>
<
span
class
=
"description"
>
Sent
you
a
message
-
3
days
ago
</
span
>
</
div
>
<!--
/.
user
-
block
-->
<
p
>
Lorem
ipsum
represents
a
long
-
held
tradition
for
designers
,
typographers
and
the
like
.
Some
people
hate
it
and
argue
for
its
demise
,
but
others
ignore
the
hate
as
they
create
awesome
tools
to
help
create
filler
text
for
everyone
from
bacon
lovers
to
Charlie
Sheen
fans
.
</
p
>
<
form
class
=
"form-horizontal"
>
<
div
class
=
"form-group margin-bottom-none"
>
<
div
class
=
"col-sm-9"
>
<
input
class
=
"form-control input-sm"
placeholder
=
"Response"
>
</
div
>
<
div
class
=
"col-sm-3"
>
<
button
type
=
"submit"
class
=
"btn btn-danger pull-right btn-block btn-sm"
>
Send
</
button
>
</
div
>
</
div
>
</
form
>
</
div
>
<!--
/.
post
-->
<!--
Post
-->
<
div
class
=
"post"
>
<
div
class
=
"user-block"
>
<
img
class
=
"img-circle img-bordered-sm"
src
=
"../../dist/img/user6-128x128.jpg"
alt
=
"User Image"
>
<
span
class
=
"username"
>
<
a
href
=
"#"
>
Adam
Jones
</
a
>
<
a
href
=
"#"
class
=
"pull-right btn-box-tool"
><
i
class
=
"fa fa-times"
></
i
></
a
>
</
span
>
<
span
class
=
"description"
>
Posted
5
photos
-
5
days
ago
</
span
>
</
div
>
<!--
/.
user
-
block
-->
<
div
class
=
"row margin-bottom"
>
<
div
class
=
"col-sm-6"
>
<
img
class
=
"img-responsive"
src
=
"../../dist/img/photo1.png"
alt
=
"Photo"
>
</
div
>
<!--
/.
col
-->
<
div
class
=
"col-sm-6"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-6"
>
<
img
class
=
"img-responsive"
src
=
"../../dist/img/photo2.png"
alt
=
"Photo"
>
<
br
>
<
img
class
=
"img-responsive"
src
=
"../../dist/img/photo3.jpg"
alt
=
"Photo"
>
</
div
>
<!--
/.
col
-->
<
div
class
=
"col-sm-6"
>
<
img
class
=
"img-responsive"
src
=
"../../dist/img/photo4.jpg"
alt
=
"Photo"
>
<
br
>
<
img
class
=
"img-responsive"
src
=
"../../dist/img/photo1.png"
alt
=
"Photo"
>
</
div
>
<!--
/.
col
-->
</
div
>
<!--
/.
row
-->
</
div
>
<!--
/.
col
-->
</
div
>
</
div
>
<!--
/.
row
-->
<!--
/.
box
-
body
-->
<
ul
class
=
"list-inline"
>
<
li
><
a
href
=
"#"
class
=
"link-black text-sm"
><
i
class
=
"fa fa-share margin-r-5"
></
i
>
Share
</
a
></
li
>
<
li
><
a
href
=
"#"
class
=
"link-black text-sm"
><
i
class
=
"fa fa-thumbs-o-up margin-r-5"
></
i
>
Like
</
a
>
</
li
>
<
li
class
=
"pull-right"
>
<
a
href
=
"#"
class
=
"link-black text-sm"
><
i
class
=
"fa fa-comments-o margin-r-5"
></
i
>
Comments
(
5
)
</
a
></
li
>
</
ul
>
<
input
class
=
"form-control input-sm"
type
=
"text"
placeholder
=
"Type a comment"
>
</
div
>
</
div
>
<!--
/.
post
-->
@
endforeach
</
div
>
</
div
>
<!--
/.
tab
-
pane
-->
<!--
/.
tab
-
pane
-->
<
div
class
=
"tab-pane"
id
=
"timeline"
>
<
div
class
=
"tab-pane"
id
=
"timeline"
>
...
...
resources/views/admin/user/userlike.blade.php
0 → 100644
View file @
4f7303da
@
extends
(
'admin/dashboard'
)
@
section
(
'content'
)
<!--
Content
Header
(
Page
header
)
-->
<
section
class
=
"content-header"
>
<
h1
>
用户列表
</
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"
></
h3
>--
}}
</
div
>
<!--
/.
box
-
header
-->
<
div
class
=
"box-body"
>
<
form
action
=
"
{
{url('user/search')}
}
"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-6"
>
<
div
class
=
"input-group"
>
<
input
type
=
"text"
class
=
"form-control"
placeholder
=
"用户名、邮箱、手机号码"
name
=
"search"
>
<
span
class
=
"input-group-btn"
>
<
button
class
=
"btn btn-default"
>
搜索
</
button
>
</
span
>
</
div
><!--
/
input
-
group
-->
</
div
><!--
/.
col
-
lg
-
6
-->
</
div
><!--
/.
row
-->
</
form
>
<
br
>
<
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
>
@
if
(
$result
==
null
)
<
tbody
>
<
tr
>
<
td
colspan
=
"9"
style
=
"text-align: center;color: red"
>
数据暂无
</
td
>
</
tr
>
</
tbody
>
</
table
>
@
else
@
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
><
img
src
=
"{{asset(
$value['head_icon']
==''?'':
$value['head_icon']
)}}"
alt
=
""
width
=
"50px"
height
=
"40px"
>
</
td
>
<
td
>
{{
$value
[
'gender'
]
==
0
?
'男'
:
'女'
}}
</
td
>
<
td
>
{{
$value
[
'email'
]}}
</
td
>
<
td
>
{{
$value
[
'status'
]}}
</
td
>
<
td
><
a
href
=
"
{
{url('user/get')}}/{{$value['id']}
}
"
class
=
"btn btn-info"
>
查看详情
</
a
>
<
a
href
=
"
{
{url('user/updatePage')}}/{{$value['id']}
}
"
class
=
"btn btn-info"
>
编辑
</
a
>
</
td
>
</
tr
>
</
tbody
>
@
endforeach
</
table
>
{{
$result
->
appends
([
'search'
=>
$params
])
->
links
()
}}
</
div
>
<!--
/.
box
-
body
-->
</
div
>
<!--
/.
box
-->
</
div
>
<!--
/.
col
-->
</
div
>
<!--
/.
row
-->
</
section
>
@
endif
@
endsection
\ No newline at end of file
resources/views/admin/usertables.blade.php
View file @
4f7303da
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
@
endforeach
@
endforeach
</
table
>
</
table
>
{{
$result
->
appends
([
'search'
=>
$params
])
->
links
()
}}
{{
$result
->
links
()
}}
</
div
>
</
div
>
<!--
/.
box
-
body
-->
<!--
/.
box
-
body
-->
</
div
>
</
div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment