Skip to content

Instantly share code, notes, and snippets.

@derekperkins
Created February 27, 2014 09:29
Show Gist options
  • Save derekperkins/9247017 to your computer and use it in GitHub Desktop.
Save derekperkins/9247017 to your computer and use it in GitHub Desktop.
/**
* /profiles/1 : works
* /workspaces/1/profiles/1 : does not work
*
*/
Router::connect(
'/workspaces/:workspaceId/profiles/:id', [
'method' => 'GET',
'controller' => 'profiles',
'action' => 'view'
]);
Router::mapResources(['workspaces', 'profiles']);
// In ProfilesController.php
/**
* view method
*
* @return void
*/
public function view() {
$this->Crud->action()->findMethod('userWorkspaceProfiles');
return $this->Crud->executeAction();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment