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
6150569e
Commit
6150569e
authored
Dec 12, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件列表关联显示项目名称 创建者名称
parent
e6f5bafb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
GroupController.php
app/Http/Controllers/GroupController.php
+0
-2
File.php
app/Models/File.php
+8
-0
groupinformation.blade.php
resources/views/admin/group/groupinformation.blade.php
+2
-2
web.php
routes/web.php
+1
-1
No files found.
app/Http/Controllers/GroupController.php
View file @
6150569e
...
...
@@ -39,8 +39,6 @@ class GroupController extends Controller
if
(
$groups
){
return
view
(
'admin/group/groupinformation'
,
compact
(
'groups'
,
'files'
));
}
return
Message
::
makeError
(
'查找失败'
);
}
...
...
app/Models/File.php
View file @
6150569e
...
...
@@ -10,4 +10,12 @@ class File extends Model
use
SoftDeletes
;
protected
$dates
=
[
'delete_at'
];
public
function
fileCreator
(){
return
$this
->
belongsTo
(
'App\Models\User'
,
'creator_id'
);
}
public
function
fileInProject
(){
return
$this
->
belongsTo
(
'App\Models\Folder'
,
'project_id'
);
}
}
resources/views/admin/group/groupinformation.blade.php
View file @
6150569e
...
...
@@ -114,8 +114,8 @@
<
td
>
{{
$file
->
file_type
}}
</
td
>
<
td
>
{{
$file
->
size
}}
</
td
>
<
td
>
{{
$file
->
folder_id
}}
</
td
>
<
td
>
{{
$file
->
project_id
}}
</
td
>
<
td
>
{{
$file
->
creator_id
}}
</
td
>
<
td
>
{{
$file
->
fileInProject
->
name
}}
</
td
>
<
td
>
{{
$file
->
fileCreator
->
user_name
}}
</
td
>
<
td
><
a
href
=
"
{
{$file->id}
}
"
class
=
"btn btn-info"
>
查看详情
</
a
>
<
a
href
=
"
{
{$file->id}
}
"
class
=
"btn bg-orange"
>
删除
</
a
>
</
td
>
...
...
routes/web.php
View file @
6150569e
...
...
@@ -114,7 +114,7 @@ Route::get('/',function (){return view('login');})->name('admin.login');
Route
::
group
([
'prefix'
=>
'file'
],
function
(){
Route
::
get
(
'get_all'
,
'FileController@getAll'
)
->
name
(
'file.getAll'
);
Route
::
delete
(
'delete
file'
,
'FileController@deletefil
e'
)
->
name
(
'file.delete'
);
Route
::
delete
(
'delete
_file'
,
'FileController@delet
e'
)
->
name
(
'file.delete'
);
});
...
...
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