Commit 9a508ad7 authored by gxx's avatar gxx

yixie

parent a739e424
......@@ -25,7 +25,7 @@ class FileService implements FileServiceContract
public function getAll($group_id)
{
$files = File::where('group_id',$group_id)->get();
$files = File::where('group_id',$group_id)->paginate(8);
if($files->isEmpty()){
return null;
}
......@@ -40,8 +40,8 @@ class FileService implements FileServiceContract
public function delete($file_id)
{
$file =File::where(["id"=>file_id])->get();
$result = $file->delete();
// $file =File::where(["id"=>file_id])->get();
// $result = $file->delete();
// $pointer = $file->pointer;
// $count =File::where(["pointer"=>$pointer])->count();
// if($result && $count == 0){
......@@ -57,6 +57,6 @@ class FileService implements FileServiceContract
// return Message::makeError('文件不存在');
// }
// }
return $result;
// return $result;
}
}
\ No newline at end of file
......@@ -95,7 +95,7 @@
<th>文件夹</th>
<th>所属项目</th>
<th>创建者</th>
<th>操作</th>
{{--<th>操作</th>--}}
</tr>
</thead>
@if($files == null)
......@@ -116,15 +116,16 @@
<td>{{$file->folder_id}}</td>
<td>{{$file->fileInProject->name}}</td>
<td>{{$file->fileCreator->user_name}}</td>
<td><a href="{{route('file.get',['id' => $file->id])}}" class="btn btn-info" > 查看详情</a>
<a href="{{route('file.delete',['id' => $file->id])}}" class="btn bg-orange" > 删除</a>
<td>
{{--<a href="{{route('file.get',['id' => $file->id])}}" class="btn btn-info" > 查看详情</a>--}}
{{--<a href="{{route('file.delete',['id' => $file->id])}}" class="btn bg-orange" > 删除</a>--}}
</td>
</tr>
</tbody>
@endforeach
@endif
</table>
{{ $files->links() }}
</div>
<!-- /.tab-pane -->
......
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