我正在使用 Weblex laravel IMAP 包,在安裝、發布等之后,我無法運行測試腳本,因為它找不到類我完全按照安裝和設置說明進行操作。順便在 laravel 5.8 上運行composer require webklex/laravel-imapphp artisan vendor:publish --provider="Webklex\IMAP\Providers\LaravelServiceProvider"我在我的根目錄(在 testproject 中,因此它與 App 和 Public 處于同一級別)中創建了一個名為 mailtest.php 的文件,但我無法通過它找到實際的類。我試過這個:$oClient = \Webklex\IMAP\Facades\Client::account('default');$oClient->connect();和這個:<?phpuse \Webklex\IMAP\Client;$oClient = new Client([ 'host' => 'somehost.com', 'port' => 993, 'encryption' => 'ssl', 'validate_cert' => true, 'username' => 'username', 'password' => 'password', 'protocol' => 'imap']);$oClient->connect();但是當通過 CLI 在我的根文件夾中運行 php mailtest.php 時,我得到:致命錯誤:未捕獲錯誤:在 /Users/testUser/Websites/task-manager/mailtest.php:3 中找不到類 'Webklex\IMAP\Facades\Client'我究竟做錯了什么?
laravel imap 類未找到,安裝好
ibeautiful
2022-10-22 16:53:49