Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在尝试将照明/文件系统包含在流明中
到目前为止,我已经成功安装了运行以下命令的包:
composer require Illuminate/Filesystem
但是我不知道如何在应用程序中注册静态类,我似乎在互联网上找不到任何关于如何将 laravel 5 包实现到流明的内容。
我尝试将类别名添加到流明的核心,但这对我来说似乎是错误的。
为外观注册一个类别名并没有错File,只是不要在框架源文件(vendor目录内)中这样做。bootstrap/app.php把它放在文件里面的好地方。只需添加这个,你就可以开始了:
File
vendor
bootstrap/app.php
class_alias('Illuminate\Support\Facades\File', 'File');
无需安装其他软件包即可使用,因为Illuminate/FilesystemLumen 已经附带。
Illuminate/Filesystem