Property | Type | Description | |
---|---|---|---|
$relations | array | Blog relation. |
Method | Description | |
---|---|---|
__construct ( |
Create a new Blog instance. | |
create ( array $data ) | Create new blog. | |
delete ( integer $id ) : boolean | Delete a blog. | |
findAllPublishedPaginated ( $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator | Paginate all published blogs. | |
findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | |
Find all blog with category. | |
findPublishedById ( integer $id ) : Illuminate\Database\Eloquent\Collection | |
Get published blog by id. | |
getCreateForm ( ) : |
Get save blog form. | |
getUpdateForm ( ) : |
Get update blog form. | |
togglePublished ( integer $id ) : boolean | Change blog's published status. | |
toggleTop ( integer $id ) : boolean | Change blog's toped status. | |
update ( $id, array $data ) | Update new blog. |
public __construct ( |
||
$blog |
public findAllPublishedPaginated ( $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator | ||
return | Illuminate\Contracts\Pagination\LengthAwarePaginator |
public findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | |
||
return | Illuminate\Database\Eloquent\Collection | |
public findPublishedById ( integer $id ) : Illuminate\Database\Eloquent\Collection | |
||
$id | integer | |
return | Illuminate\Database\Eloquent\Collection | |
public getCreateForm ( ) : |
||
return |
public getUpdateForm ( ) : |
||
return |
public togglePublished ( integer $id ) : boolean | ||
$id | integer | |
return | boolean |
protected static array $relations | ||
return | array |