Skip to content

Instantly share code, notes, and snippets.

@joshperry
Forked from auniverseaway/gist:2ffb4799a6f05eaa997e
Last active August 29, 2015 14:04
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 joshperry/69b29dec771e357da618 to your computer and use it in GitHub Desktop.
Save joshperry/69b29dec771e357da618 to your computer and use it in GitHub Desktop.
public function getRecentEpisodes()
{
$podcastid = Input::get('podcast_id');
$podcast = Podcast::find($podcastid);
// If we don't have any epsisodes, we need to import them for the feed
$this->episodesController->importEpisodes($podcast);
// Now let's collect our episodes
$episodes = $this->episodesController->getLastTenEpisodes($podcast);
$return = array(
'response' => $episodes
);
return $return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment