group(function () { Route::resource('past_transaction', 'PastTransactionResourceController'); }); // Public routes for past_transaction Route::get('transactions/', 'PastTransactionPublicController@index'); Route::get('transactions/{slug?}', 'PastTransactionPublicController@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', 'PastTransactionResourceController'); }); // Public routes for pages Route::get('transactions/', 'PastTransactionPublicController@index'); Route::get('transactions/{slug?}', 'PastTransactionPublicController@show'); } ); } // web routes for transaction_file Route::prefix('{guard}/transaction')->group(function () { Route::resource('transaction_file', 'TransactionFileResourceController'); }); // Public routes for transaction_file Route::get('transactions/', 'TransactionFilePublicController@index'); Route::get('transactions/{slug?}', 'TransactionFilePublicController@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', 'TransactionFileResourceController'); }); // Public routes for pages Route::get('transactions/', 'TransactionFilePublicController@index'); Route::get('transactions/{slug?}', 'TransactionFilePublicController@show'); } ); }