group(function () { Route::resource('payment', 'PaymentResourceController'); }); // Public routes for payment Route::get('payments/', 'PaymentPublicController@index'); Route::get('payment/{slug?}', 'PaymentPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for payment Route::prefix('{guard}/payment')->group(function () { Route::resource('payment', 'PaymentResourceController'); }); // Public routes for payment Route::get('payments/', 'PaymentPublicController@index'); Route::get('payment/{slug?}', 'PaymentPublicController@show'); } ); }