Skip to content

Instantly share code, notes, and snippets.

@kemo
Created December 21, 2011 14:46
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 kemo/1506275 to your computer and use it in GitHub Desktop.
Save kemo/1506275 to your computer and use it in GitHub Desktop.
Kohanas' new view action return handling
<?php
public function action_index()
{
$causes_count = ORM::factory('cause')->count_all();
$causes = ORM::factory('cause')->paginate($causes_count)->find_all();
return compact('causes','causes_count');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment