Method |
Description |
|
__construct ( Post $post, Category $category, Tag $tag ) |
BlogRepository constructor. |
|
all ( integer $n = null, boolean $published = true ) : mixed |
Get all posts. |
|
body ( $id ) : mixed |
Get post body. |
|
destroy ( $id ) |
Destroy a post. |
|
doFavorite ( $id ) |
Update favorite count |
|
getByColumn ( string $value, string $column = 'id' ) |
Get post by given column. |
|
parseCategory ( $name ) : mixed |
Get or create new category and return category id. |
|
parseOrigin ( $origin ) : string |
Parse Markdown. |
|
search ( $key, integer $pagination = 10 ) : mixed |
Search in all published posts. |
|
store ( $inputs ) |
Store new post in database. |
|
update ( $inputs, $id ) |
Update a post. |
|
updatePublish ( $input, $id ) |
Update post published status |
|