PHP Class Corcel\PostBuilder

Inheritance: extends Illuminate\Database\Eloquent\Builder
Afficher le fichier Open project: jgrossi/corcel Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

paged() public méthode

Paginate the results
public paged ( integer $perPage = 10, integer $currentPage = 1 ) : Illuminate\Database\Eloquent\Collection
$perPage integer
$currentPage integer
Résultat Illuminate\Database\Eloquent\Collection

published() public méthode

Get only published posts
public published ( ) : PostBuilder
Résultat PostBuilder

slug() public méthode

Get only posts with a specific slug
public slug ( $slug ) : PostBuilder
Résultat PostBuilder

status() public méthode

Get only posts with a custom status
public status ( string $postStatus ) : PostBuilder
$postStatus string
Résultat PostBuilder

taxonomy() public méthode

public taxonomy ( $taxonomy, $term )

type() public méthode

Get only posts from a custom post type
public type ( string $type ) : PostBuilder
$type string
Résultat PostBuilder

typeIn() public méthode

Get only posts from an array of custom post types
public typeIn ( array $type ) : PostBuilder
$type array
Résultat PostBuilder