PHP Класс Corcel\PostBuilder

Наследование: extends Illuminate\Database\Eloquent\Builder
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
paged ( integer $perPage = 10, integer $currentPage = 1 ) : Illuminate\Database\Eloquent\Collection Paginate the results
published ( ) : PostBuilder Get only published posts
slug ( $slug ) : PostBuilder Get only posts with a specific slug
status ( string $postStatus ) : PostBuilder Get only posts with a custom status
taxonomy ( $taxonomy, $term )
type ( string $type ) : PostBuilder Get only posts from a custom post type
typeIn ( array $type ) : PostBuilder Get only posts from an array of custom post types

Описание методов

paged() публичный Метод

Paginate the results
public paged ( integer $perPage = 10, integer $currentPage = 1 ) : Illuminate\Database\Eloquent\Collection
$perPage integer
$currentPage integer
Результат Illuminate\Database\Eloquent\Collection

published() публичный Метод

Get only published posts
public published ( ) : PostBuilder
Результат PostBuilder

slug() публичный Метод

Get only posts with a specific slug
public slug ( $slug ) : PostBuilder
Результат PostBuilder

status() публичный Метод

Get only posts with a custom status
public status ( string $postStatus ) : PostBuilder
$postStatus string
Результат PostBuilder

taxonomy() публичный Метод

public taxonomy ( $taxonomy, $term )

type() публичный Метод

Get only posts from a custom post type
public type ( string $type ) : PostBuilder
$type string
Результат PostBuilder

typeIn() публичный Метод

Get only posts from an array of custom post types
public typeIn ( array $type ) : PostBuilder
$type array
Результат PostBuilder