0
所以在我的Laravel應用程序中,我想將一個參數傳遞給一個命名的路線,然後也有邏輯(幾個if語句),所以我可以從控制器返回特定的功能。我知道下面的語法是不正確的,但我想要做的事,如下面我可以在Laravel路徑中添加邏輯嗎?
Route::get('profile', function(){
if(Config::get('constants.ORG_ID') === 'organization'){
[
'as' => 'profile',
'uses' => '[email protected]'
]
}
});