我想在 filesystems.php 中添加一个路径“C:\Folder”用于存储目的
当我使用以下代码时出现错误:
Driver [] is not supported.
代码:
'c_path' => [
'driver' => 'local',
'root' => "C:/Folder/",
],
那么如何解决这个问题呢?有人可以建议我解决方案吗?
最佳答案
从终端运行,
composer require league/flysystem
在你的filesystems.php文件中
'c_path' => [
'driver' => 'local',
'root' => 'C:\uploads'
],
然后存储你的文件,
Storage::disk('c_path')->put('picture.png', $request->file('picture'));
关于php - 在 filesystems.php Laravel 中添加自定义存储路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54039755/