我需要在控制器中獲得'mp3'值! (從mp3s type
檢查崗位)Laravel.54將數據傳遞給動作控制器
我文章類型: 視頻,相冊,MP3
(web.php)
Route::group(array('prefix' => 'mp3s'), function($pt) {
Route::get("/", "[email protected]");
Route::get("mp3/{slug}", "[email protected]");
});
Route::group(array('prefix' => 'albums'), function($pt) {
Route::get("/", "[email protected]");
Route::get("album/{slug}", "[email protected]");
});
Route::group(array('prefix' => 'videos'), function($pt) {
Route::get("/", "[email protected]");
Route::get("video/{slug}", "[email protected]");
});
爲什麼不直接使用路線::獲得(「{PREFIX}/{slug}「,」PostController @ singlePost「); ? – KoIIIeY
你的意思是你想在控制器的功能中獲得slug值嗎? –
@PHPWeblineindia我可以得到slu 012 –