2017 © Pedro Peláez
 

library modules-blog

Ready to use blog module for laravel.

image

ozankurt/modules-blog

Ready to use blog module for laravel.

  • Saturday, November 25, 2017
  • by OzanKurt
  • Repository
  • 1 Watchers
  • 4 Stars
  • 62 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

KurtModules-Blog

I tried to extract a simple, reusable blog module to use on my projects. I used two external packages in total. For keeping the URL pretty on every possible page, I added Eloquent Sluggable and for displaying the content of a post I decided to use Laravel Markdown. This can of course be overwritten., (*1)

The module includes the following models and each model has a default observer:, (*2)

PS: Observers are currently not customizable. :(, (*3)

Category

Methods Description
posts() Posts of the category. (hasMany)
postsCount() Posts count of the category. (hasOne)
latestPost() Latest post of the category. (hasOne)
scopePopular($descending = true) Order the categories accoring to their popularities. (scope)

Tag

Methods Description
posts() Posts of the tag. (belongsToMany)
postsCount() Posts count of the tag. (hasOne)
latestPost() Latest post of the tag.

Post

Posts have a media type attribute so that the users can choose between a Text Post, Single Image Post, Multiple Image Post or Video Post. Videos support 3 different websites: YouTube, Vimeo, DailyMotion, (*4)

Methods Description
category() Category of the post. (belongsTo)
user() User of the post. (belongsTo)
comments() Comments of the post. (hasMany)
commentsCount() Comments count of the post. (hasOne)
latestComment() Latest comment of the post.
tags() Tags of the post. (belongsToMany)
tagsCount() Tag count of the post. (hasOne)
scopePopular($descending = true) Order the categories accoring to their popularities. (scope)
scopeInCategory($categoryId = true) Filter the posts to a category. (scope)*
scopeWithTags($tagIds = [], $and = false) Filter the posts by their tags. (scope)*

PS: * This should be able to receive multiple ids sometime., (*5)

Comment

Methods Description
post() Post of the comment. (belongsTo)
user() User of the comment. (belongsTo)
isApproved() Check the approval state of the comment.
approve($state = true) Update the appvoval of the comment.
disapprove() Update the appvoval of the comment.

Contribution guidelines

Todo: Add contribution guidelines., (*6)

Who do I talk to?

Owner:, (*7)

The Versions

25/11 2017

dev-master

9999999-dev

Ready to use blog module for laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel module blog

03/02 2017

v0.2.0

0.2.0.0

Ready to use blog module for laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel module blog

13/12 2016

dev-laravel-5.2-package-shift

dev-laravel-5.2-package-shift

Ready to use blog module for laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel module blog

24/06 2016

v0.1.2

0.1.2.0

Ready to use blog module for laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel module blog

20/06 2016

v0.1.1

0.1.1.0

Ready to use blog module for laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel module blog

19/06 2016

v0.1.0

0.1.0.0

Ready to use blog module for laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel module blog