group(function () { Route::resource('notification', 'NotificationResourceController'); }); 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', 'NotificationResourceController'); }); // Public routes for pages Route::get('notifications/', 'NotificationPublicController@index'); Route::get('notifications/{slug?}', 'NotificationPublicController@show'); } ); }