public function execute() { $series = $this->series->orderBy('updated_at', 'asc')->take(10)->get(); $this->log("Updating videos of " . $series->count() . " series."); $series->each(function ($model) { $data = collect(['config' => ['mode' => 'update'], 'series' => $model]); $this->dispatch(new Asyncify($data, $this->getPipeline())); }); }
public function execute() { $series = $this->series->doesntHave('videos')->orderBy('created_at', 'desc')->get(); $this->log("Populating " . $series->count() . " series."); $series->each(function ($model) { $data = collect(['config' => ['mode' => 'new'], 'series' => $model]); $this->dispatch(new Asyncify($data, $this->getPipeline())); }); }
public function get($id) { $series = Series::findOrFail($id)->load('videos', 'creator')->get(); return $series->first(); }
public function update() { $playlists = Series::orderBy('updated_at', 'asc')->take(5)->get(); $this->getContent($playlists); print "Content updated!"; }