Текущий код:
Код: Выделить всё
// Getting files from storage:
$files = Storage::disk('articles')->allFiles();
$articles = [];
foreach ($files as $file) {
$storage = Storage::disk('articles')->get($file);
array_push($articles, $storage);
$collection = collect($articles);
}
$array = collect($articles);
$articles = $this->paginate($array);
return view('pages.home', compact('articles'));
Код: Выделить всё
$filePath = Storage::path($file);
$fileDate = filemtime($filePath);
dd($fileDate);
Код: Выделить всё
ErrorException
filemtime(): stat failed for C:\my-project\storage\app\article-file.md
Код: Выделить всё
statФункция Хранилище подключено, файл существует, он возвращает правильный путь...
Я закончились идеи...
Подробнее здесь: https://stackoverflow.com/questions/710 ... in-laravel
Мобильная версия