0
Router::scope('/:language/employer/', ['plugin' => 'EmployerPanel'], function ($routes) {
$routes->prefix('employer',function ($routes) {
$routes->connect(':language/:controller',['plugin'=>'EmployerPanel']);
});
$routes->fallbacks('InflectedRoute');
});
這必須用插件去EmployerPanel插件,網頁控制器和行動是家裏用的語言連接。如何使CakePHP的3語言路線plguin
http://localhost/mmjob/en/empoyer/pages/home
,但它是在調試請求
language => en
controller => Employer
action => pages
pass(array)
plugin(null)
_matchedRoute/:language/:controller/:action/*
_ext(null)
我如何能做到爲_matchedRoute = /:language/:plugin/:controller:/:action
這是此http優良的工作://本地主機/ mmjob/employer-panel/en/employer鏈接? @Jsonras –
這是不是回答你的問題?你需要插件名稱傳入嗎? – Jsonras
我想爲整個僱主面板提供語言路線@Jsonras謝謝 –