group(function () { Route::get('past_transaction/form/{element}', 'PastTransactionAPIController@form'); Route::resource('past_transaction', 'PastTransactionAPIController'); }); // 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 transactions Route::prefix('{guard}/transaction')->group(function () { Route::get('past_transaction/form/{element}', 'PastTransactionAPIController@form'); Route::apiResource('past_transaction', 'PastTransactionAPIController'); }); // Public routes for transactions Route::get('transaction/PastTransaction', 'PastTransactionPublicController@getPastTransaction'); } ); } // API routes for transaction_file Route::prefix('{guard}/transaction')->group(function () { Route::get('transaction_file/form/{element}', 'TransactionFileAPIController@form'); Route::resource('transaction_file', 'TransactionFileAPIController'); }); // 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 transactions Route::prefix('{guard}/transaction')->group(function () { Route::get('transaction_file/form/{element}', 'TransactionFileAPIController@form'); Route::apiResource('transaction_file', 'TransactionFileAPIController'); }); // Public routes for transactions Route::get('transaction/TransactionFile', 'TransactionFilePublicController@getTransactionFile'); } ); }