group(function () { Route::resource('emailtemp', 'EmailtempResourceController'); }); // Public routes for emailtemp Route::get('emailtemps/', 'EmailtempPublicController@index'); Route::get('emailtemps/{slug?}', 'EmailtempPublicController@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', 'EmailtempResourceController'); }); // Public routes for pages Route::get('emailtemps/', 'EmailtempPublicController@index'); Route::get('emailtemps/{slug?}', 'EmailtempPublicController@show'); } ); }