From b14e13c8b4b10714af581141228904786b6922a9 Mon Sep 17 00:00:00 2001 From: WDDA Date: Thu, 2 Feb 2023 22:33:38 +0300 Subject: [PATCH] Dev --- app/Models/Resources/Files.php | 6 ++++-- resources/views/resources/files/index.blade.php | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Models/Resources/Files.php b/app/Models/Resources/Files.php index 5211aef..6e161cd 100644 --- a/app/Models/Resources/Files.php +++ b/app/Models/Resources/Files.php @@ -35,11 +35,13 @@ public static function getList(): array foreach ($files as $file) { if ($file != '.' && $file != '..') { - if (file_exists($pathDir . '/' . $file)) { + $pathFile = $pathDir . '/' . $file; + if (file_exists($pathFile)) { $result[] = [ 'name' => $file, 'path' => $pathDir, - 'folder' => $dir + 'folder' => $dir, + 'date_time' => date ("d.m.Y H:i:s", filemtime($pathFile)) ]; } } diff --git a/resources/views/resources/files/index.blade.php b/resources/views/resources/files/index.blade.php index 2282a62..2b8b2c9 100644 --- a/resources/views/resources/files/index.blade.php +++ b/resources/views/resources/files/index.blade.php @@ -14,6 +14,7 @@ name folder + date action @@ -22,6 +23,7 @@ {{ $file['name'] }} {{ $file['folder'] }} + {{ $file['date_time'] }}
@@ -42,10 +44,6 @@
- - - - @endforeach