group(function () { Route::resource('notification_schedule', 'NotificationScheduleResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'NotificationScheduleResourceController'); }); // Public routes for pages Route::get('notification_schedules/', 'NotificationSchedulePublicController@index'); Route::get('notification_schedules/{slug?}', 'NotificationSchedulePublicController@show'); } ); } // web routes for notification_delivered_list Route::prefix('{guard}/notification_schedules')->group(function () { Route::resource('notification_delivered_list', 'NotificationDeliveredListResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'NotificationDeliveredListResourceController'); }); // Public routes for pages Route::get('notification_schedules/', 'NotificationDeliveredListPublicController@index'); Route::get('notification_schedules/{slug?}', 'NotificationDeliveredListPublicController@show'); } ); }