group(function () { Route::get('notification_schedule/form/{element}', 'NotificationScheduleAPIController@form'); Route::resource('notification_schedule', 'NotificationScheduleAPIController'); }); // Public routes for notification_schedule Route::get('notification_schedules/', 'NotificationSchedulePublicController@index'); Route::get('notification_schedules/{slug?}', 'NotificationSchedulePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for notification_schedules Route::prefix('{guard}/notification_schedule')->group(function () { Route::get('notification_schedule/form/{element}', 'NotificationScheduleAPIController@form'); Route::apiResource('notification_schedule', 'NotificationScheduleAPIController'); }); // Public routes for notification_schedules Route::get('notification_schedule/NotificationSchedule', 'NotificationSchedulePublicController@getNotificationSchedule'); } ); } // API routes for notification_delivered_list Route::prefix('{guard}/notification_schedule')->group(function () { Route::get('notification_delivered_list/form/{element}', 'NotificationDeliveredListAPIController@form'); Route::resource('notification_delivered_list', 'NotificationDeliveredListAPIController'); }); // Public routes for notification_delivered_list Route::get('notification_schedules/', 'NotificationDeliveredListPublicController@index'); Route::get('notification_schedules/{slug?}', 'NotificationDeliveredListPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for notification_schedules Route::prefix('{guard}/notification_schedule')->group(function () { Route::get('notification_delivered_list/form/{element}', 'NotificationDeliveredListAPIController@form'); Route::apiResource('notification_delivered_list', 'NotificationDeliveredListAPIController'); }); // Public routes for notification_schedules Route::get('notification_schedule/NotificationDeliveredList', 'NotificationDeliveredListPublicController@getNotificationDeliveredList'); } ); }