Esempio n. 1
0
 public function onRun()
 {
     $id = $this->param('id');
     if ($id) {
         $this->addJs('assets/mediaelement/lib/mediaelement.js');
         $this->addJs('assets/mediaelement/lib/mediaelementplayer.js');
         $this->addCss('assets/mediaelement/skin/mediaelementplayer.css');
         $this->sermon = Sermons::with('series', 'person')->find($id);
     } else {
         $this->sermon = Sermons::with('series', 'person')->orderBy('sermondate', 'desc')->first();
     }
     $this->sermondate = date("d F", strtotime($this->sermon->sermondate));
 }
Esempio n. 2
0
 public function onRun()
 {
     $id = $this->param('id');
     $this->addJs('assets/mediaelement/lib/mediaelement.js');
     $this->addJs('assets/mediaelement/lib/mediaelementplayer.js');
     $this->addJs('assets/mediaelement/playlist/mep-feature-playlist.js');
     $this->addCss('assets/mediaelement/skin/mediaelementplayer.css');
     $this->addCss('assets/mediaelement/playlist/mep-feature-playlist.css');
     if (strpos($_SERVER['REQUEST_URI'], 'series/' . $id)) {
         $this->sermons = Sermons::with('person')->where('series_id', '=', $id)->get();
         $this->series = SermonSeries::find($id);
     } else {
         $this->sermon = Sermons::with('series', 'person')->find($id);
     }
 }