Exemplo n.º 1
0
 /**
  * Return an index of existing post type fields.
  *
  * @param FieldTableBuilder $table
  * @param PostModel         $model
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(FieldTableBuilder $table, PostModel $model)
 {
     $table->setStream($model->getStream());
     return $table->render();
 }
Exemplo n.º 2
0
 /**
  * Get featured posts.
  *
  * @return EntryCollection
  */
 public function getFeatured($limit = null)
 {
     return $this->model->enabled()->where('featured', true)->paginate($limit);
 }
Exemplo n.º 3
0
 /**
  * Get recent posts.
  *
  * @return EntryCollection
  */
 public function getRecent($limit = null)
 {
     return $this->model->with(['category'])->orderBy('created_at', 'DESC')->paginate($limit);
 }