group(function () { Route::get('call/form/{element}', 'CallAPIController@form'); Route::resource('call', 'CallAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for activities Route::prefix('{guard}/activity')->group(function () { Route::get('call/form/{element}', 'CallAPIController@form'); Route::apiResource('call', 'CallAPIController'); }); // Public routes for activities Route::get('activity/Call', 'CallPublicController@getCall'); } ); } // API routes for meeting Route::prefix('{guard}/activity')->group(function () { Route::get('meeting/form/{element}', 'MeetingAPIController@form'); Route::resource('meeting', 'MeetingAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for activities Route::prefix('{guard}/activity')->group(function () { Route::get('meeting/form/{element}', 'MeetingAPIController@form'); Route::apiResource('meeting', 'MeetingAPIController'); }); // Public routes for activities Route::get('activity/Meeting', 'MeetingPublicController@getMeeting'); } ); } // API routes for task Route::prefix('{guard}/activity')->group(function () { Route::get('task/form/{element}', 'TaskAPIController@form'); Route::resource('task', 'TaskAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for activities Route::prefix('{guard}/activity')->group(function () { Route::get('task/form/{element}', 'TaskAPIController@form'); Route::apiResource('task', 'TaskAPIController'); }); // Public routes for activities Route::get('activity/Task', 'TaskPublicController@getTask'); } ); } // API routes for attendee Route::prefix('{guard}/activity')->group(function () { Route::get('attendee/form/{element}', 'AttendeeAPIController@form'); Route::resource('attendee', 'AttendeeAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for activities Route::prefix('{guard}/activity')->group(function () { Route::get('attendee/form/{element}', 'AttendeeAPIController@form'); Route::apiResource('attendee', 'AttendeeAPIController'); }); // Public routes for activities Route::get('activity/Attendee', 'AttendeePublicController@getAttendee'); } ); } // API routes for calendar Route::prefix('{guard}/activity')->group(function () { Route::get('calendar/form/{element}', 'CalendarAPIController@form'); Route::resource('calendar', 'CalendarAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for activities Route::prefix('{guard}/activity')->group(function () { Route::get('calendar/form/{element}', 'CalendarAPIController@form'); Route::apiResource('calendar', 'CalendarAPIController'); }); // Public routes for activities Route::get('activity/Calendar', 'CalendarPublicController@getCalendar'); } ); }