group(function () { Route::get('offplan/form/{element}', 'OffplanAPIController@form'); Route::resource('offplan', 'OffplanAPIController'); }); // Public routes for offplan Route::get('offplans/', 'OffplanPublicController@index'); Route::get('offplans/{slug?}', 'OffplanPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for offplans Route::prefix('{guard}/offplan')->group(function () { Route::get('offplan/form/{element}', 'OffplanAPIController@form'); Route::apiResource('offplan', 'OffplanAPIController'); }); // Public routes for offplans Route::get('offplan/Offplan', 'OffplanPublicController@getOffplan'); } ); }