/** * * @author Petros Diveris * @version 0.1 * @var string mime */ public function getMedia($mime = 'image') { return MediaView::where('content_id', '=', $this->id)->where('mimetype', 'like', "{$mime}%")->orderBy('tag', 'asc')->orderBy('position', 'asc')->get(); }