group(function () { Route::get('order/form/{element}', 'OrderAPIController@form'); Route::resource('order', 'OrderAPIController'); }); // Public routes for order Route::get('orders/', 'OrderPublicController@index'); Route::get('orders/{slug?}', 'OrderPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for orders Route::prefix('{guard}/order')->group(function () { Route::get('order/form/{element}', 'OrderAPIController@form'); Route::apiResource('order', 'OrderAPIController'); }); // Public routes for orders Route::get('order/Order', 'OrderPublicController@getOrder'); } ); } // API routes for detail Route::prefix('{guard}/order')->group(function () { Route::get('detail/form/{element}', 'DetailAPIController@form'); Route::resource('detail', 'DetailAPIController'); }); // Public routes for detail Route::get('orders/', 'DetailPublicController@index'); Route::get('orders/{slug?}', 'DetailPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for orders Route::prefix('{guard}/order')->group(function () { Route::get('detail/form/{element}', 'DetailAPIController@form'); Route::apiResource('detail', 'DetailAPIController'); }); // Public routes for orders Route::get('order/Detail', 'DetailPublicController@getDetail'); } ); } // API routes for history Route::prefix('{guard}/order')->group(function () { Route::get('history/form/{element}', 'HistoryAPIController@form'); Route::resource('history', 'HistoryAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for orders Route::prefix('{guard}/order')->group(function () { Route::get('history/form/{element}', 'HistoryAPIController@form'); Route::apiResource('history', 'HistoryAPIController'); }); // Public routes for orders Route::get('order/History', 'HistoryPublicController@getHistory'); } ); }