PHP Class Learner\Repositories\Eloquent\NewsletterRepository

Inheritance: extends AbstractRepository, implements Learner\Repositories\NewsletterRepositoryInterface
显示文件 Open project: RryLee/learner.video

Public Methods

Method Description
__construct ( Newsletter $newsletter ) Create a new repository instance.
delete ( integer $id ) Delete a newsletter.
findAll ( ) : Illuminate\Database\Eloquent\Collection Find all newsletter.
findAllPublishedWithPaginator ( integer $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Find all published newsletters.
findPublishedWithRelationById ( integer $id ) : Illuminate\Contracts\Pagination\LengthAwarePaginator Find published newsletter by id.
getNewletterLinkById ( integer $id ) : Illuminate\Database\Eloquent\Collection Get all link of given ids' newsletter
store ( string $title ) : Illuminate\Database\Eloquent\Collection Store a new newsletter.

Method Details

__construct() public method

Create a new repository instance.
public __construct ( Newsletter $newsletter )
$newsletter Learner\Models\Newsletter

delete() public method

Delete a newsletter.
public delete ( integer $id )
$id integer

findAll() public method

Find all newsletter.
public findAll ( ) : Illuminate\Database\Eloquent\Collection
return Illuminate\Database\Eloquent\Collection

findAllPublishedWithPaginator() public method

Find all published newsletters.
public findAllPublishedWithPaginator ( integer $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
$perPage integer
return Illuminate\Contracts\Pagination\LengthAwarePaginator

findPublishedWithRelationById() public method

Find published newsletter by id.
public findPublishedWithRelationById ( integer $id ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
$id integer
return Illuminate\Contracts\Pagination\LengthAwarePaginator

getNewletterLinkById() public method

Get all link of given ids' newsletter
public getNewletterLinkById ( integer $id ) : Illuminate\Database\Eloquent\Collection
$id integer
return Illuminate\Database\Eloquent\Collection

store() public method

Store a new newsletter.
public store ( string $title ) : Illuminate\Database\Eloquent\Collection
$title string
return Illuminate\Database\Eloquent\Collection