0
我與線程laravel 5.工作,我必須通過Console一切設置正確。Autloading類在Laravel通過螺紋
我使用的是工人和堆疊線程到工人,開始像這樣
$worker->start(PTHREADS_INHERIT_NONE);
和我都需要「供應商/自動加載」
require ("vendor/autoload.php");
Worker類的run函數工人
我定義的類已經加載,但我得到以下錯誤
PHP Fatal error:
Uncaught RuntimeException: A facade root has not been set. in C:\xampp\htdocs\civampems\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:235
關於調用
DB::tables();
完整的堆棧跟蹤具有以下
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in C:\xampp\htdocs\civampems\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:235
Stack trace:
#0 C:\xampp\htdocs\civampems\app\Engine\Logic\Administrator\Reports\ReportManagement.php(476): Illuminate\Support\Facades\Facade::__callStatic('table', Array)
#1 C:\xampp\htdocs\civampems\app\Engine\Logic\Administrator\Reports\ReportManagement.php(502): App\Engine\Logic\Administrator\Reports\ReportManagement->getCenterDetails('4010108')
#2 C:\xampp\htdocs\civampems\app\Engine\Threads\ThreadClass\StatePaperAttendancePDFThread.php(41): App\Engine\Logic\Administrator\Reports\ReportManagement->centerPaperAttendance('4010108', '70')
#3 [internal function]: App\Engine\Threads\ThreadClass\StatePaperAttendancePDFThread->run()
#4 {main}
thrown in C:\xampp\htdocs\civampems\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 235
我的問題是:
如何加載laravel類成功
任何幫助將是非常讚賞。
更新您的作曲家 – Komal
@Komal我已經更新了我的作曲家,但它仍然是相同的 – Algorithm