You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
Here is how I solved this problem. Ugly, yes, but it works.
What I was trying to do was route site.com/rest/v1/document-manager to /application/modules/documentmanager/controllers/api/
I modified the /application/config/routes.php file and added
/**
* Custom API routing for DocumentManager module
*
* Maps `rest/v1/documentmanager/export-to-xml` to
* application/modules/documentmanager/api/ExportToXml` or
* any other routes that matches this pattern.
*
* @author Cosmo Mathieu
*/
$request = array_keys($_REQUEST);
if(isset($request[0]) && strpos($request[0], 'rest/v1/documentmanager') !== false){
$segments = explode('/', trim($request[0], '/'));
$controller = '';
foreach(explode('-', $segments[3]) as $bit){
$controller .= ucfirst($bit);
}
Route::any('rest/v1/documentmanager/(:any)/(:any)', 'documentmanager/api/'.$controller.'/$2');
unset($controller, $segments);
}
This may be a limitation of CI, BF, or just me, but the following did not work
I'm having a bit of issue figuring out how to configure a route using BF 0.7.
What I want to accomplish:
Map
rest/v1/posts
tomodules/blog/controllers/api/posts
What I've tried:
The text was updated successfully, but these errors were encountered: