PHP Interface App\Repositories\NewsItemRepository

Inheritance: extends Repository
Show file Open project: spatie-custom/blender

Public Methods

Method Description
findBySlug ( string $slug ) : NewsItem
findNext ( NewsItem $newsItem ) : NewsItem | null
findOnline ( integer $id ) : NewsItem
findPrevious ( NewsItem $newsItem ) : NewsItem | null
getAllOnline ( ) : Collection
getLatest ( integer $amount ) : Collection
paginate ( integer $perPage ) : Illuminate\Contracts\Pagination\Paginator

Method Details

findBySlug() public static method

public static findBySlug ( string $slug ) : NewsItem
$slug string
return app\models\NewsItem

findNext() public static method

public static findNext ( NewsItem $newsItem ) : NewsItem | null
$newsItem app\models\NewsItem
return app\models\NewsItem | null

findOnline() public static method

public static findOnline ( integer $id ) : NewsItem
$id integer
return app\models\NewsItem

findPrevious() public static method

public static findPrevious ( NewsItem $newsItem ) : NewsItem | null
$newsItem app\models\NewsItem
return app\models\NewsItem | null

getAllOnline() public static method

public static getAllOnline ( ) : Collection
return Illuminate\Support\Collection

getLatest() public static method

public static getLatest ( integer $amount ) : Collection
$amount integer
return Illuminate\Support\Collection

paginate() public static method

public static paginate ( integer $perPage ) : Illuminate\Contracts\Pagination\Paginator
$perPage integer
return Illuminate\Contracts\Pagination\Paginator