我在使用Homestead開發我的開發機器。我承諾我的composer.lock
和composer.json
。在此分支中,我將Hashid
和LaravelDebugBar
添加到作曲家用於開發目的。在開發機器上一切正常。PHP致命錯誤:未找到類'Vinkla Hashids HashidsServiceProvider'
有一次,我從師傅拉着我的生產機器,跑composer update
,我也得到了以下錯誤:
當我php artisan migrate
或composer update
型,我得到以下錯誤:
PHP Fatal error: Class 'Vinkla\Hashids\HashidsServiceProvider' not found in /var/www/schedulizer/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Vinkla\Hashids\HashidsServiceProvider' not found
我試過composer clear-compiled
,composer dump-autoload
手動嘗試需要Hashid
包,並刪除0123行中的違規行和運行作曲家更新
我檢查了服務供應商,它在我config/app.php
..
項目文件夾中的Vinkla \ Hashids \ HashidsServiceProvider類是否在某處? 'grep -R「Vinkla \ Hashids \ HashidsServiceProvider」。/' – Samsquanch
grep似乎沒有返回結果,但是我可以在'config/app.php'中找到它。 – theGreenCabbage