/** * ### Bileşeni çalıştırma * run() metodu, bir controller gibi işlev görür. * * @return $this */ public function run() { $contents = Content::ContentTypeId($this->config['content_type_id'])->LanguageId(null, $this->config['language_id'])->Published()->orderBy($this->config['order_by'], $this->config['order'])->take($this->config['limit'])->SiteId()->get(); return view("ContentWidget::content_widget", ['config' => $this->config])->with('contents', $contents); }