Beispiel #1
0
 /**
  * Get the widget data to send to the view
  * @return string
  */
 protected function data()
 {
     $limit = $this->setting->get('blog::latest-posts-amount', locale(), 5);
     return ['posts' => $this->post->latest($limit)];
 }
Beispiel #2
0
 public function compose(View $view)
 {
     $limit = $this->setting->get('blog::latest-posts-amount', locale(), 5);
     $view->with('latestPosts', $this->post->latest($limit));
 }