第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Symfony 路由資源和 Bundle 名稱

Symfony 路由資源和 Bundle 名稱

PHP
溫溫醬 2022-07-02 16:52:16
我試圖將一個文件包含到 Symfony 4 路由中,但無法弄清楚放入 Bundle 名稱的正確方法是什么。我的路線.yml:icatcher_builder:    # loads routes from the given routing file stored in some bundle    resource: '@ICatcher/Builder/Resources/config/routes.yaml'我的 bundles.php:App\ICatcher\Builder\Builder::class => ['dev' => true, 'test' => true],我得到這個錯誤:在渲染模板期間拋出異常(“Bundle“ICatcher”不存在或未啟用。也許您忘記將其添加到 App\Kernel.php 文件的 registerBundles() 方法中?在@ICatcher 中) /Builder/Resources/config/routes.yaml(從“[PATH]\config/routes.yaml”導(dǎo)入)。確保“ICatcher/Builder/Resources/config/routes.yaml”包已正確注冊并在應(yīng)用程序內(nèi)核類中加載。如果捆綁包已注冊,請確保捆綁包路徑“@ICatcher/Builder/Resources/config/routes.yaml”不為空?!保?。如果我只是將路由復(fù)制到主 route.yml 文件中而不是包含外部資源 - 一切正常。
查看完整描述

1 回答

?
四季花海

TA貢獻(xiàn)1811條經(jīng)驗 獲得超5個贊

Symfony 有嚴(yán)格的 Bundle 類命名規(guī)則,我在文檔中找到了這些規(guī)則: https ://symfony.com/doc/current/bundles/best_practices.html

因此,我的 Bundle 類現(xiàn)在從App\ICatcher\Builder\Builderto重命名,App\ICatcher\Builder\ICatcherBuilder并且文件以相同的方式重命名ICatcherBuilder.php并且可以正常工作。


查看完整回答
反對 回復(fù) 2022-07-02
  • 1 回答
  • 0 關(guān)注
  • 139 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號