group(function () { Route::resource('search_log', 'SearchLogResourceController'); }); // Public routes for search_log Route::get('search_logs/', 'SearchLogPublicController@index'); Route::get('search_logs/{slug?}', 'SearchLogPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'SearchLogResourceController'); }); // Public routes for pages Route::get('search_logs/', 'SearchLogPublicController@index'); Route::get('search_logs/{slug?}', 'SearchLogPublicController@show'); } ); }