Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save besabellacyrus/374f31b8605006ac740b3aa35157194a to your computer and use it in GitHub Desktop.
Save besabellacyrus/374f31b8605006ac740b3aa35157194a to your computer and use it in GitHub Desktop.
Fuelcms relationship
$data['doctor'] = fuel_model(
'doctors',
array(
'find' => 'one',
'where' => array('name' => $name),
'return_method' => 'object'
)
);
then in your view
foreach ($doctor->specialties as $s) {
$s->title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment