2017 © Pedro Peláez
 

library laravel-commentary

A package for Laravel to post a comment on an article and to manage them.

image

alexwenzel/laravel-commentary

A package for Laravel to post a comment on an article and to manage them.

  • Tuesday, September 2, 2014
  • by alexwenzel
  • Repository
  • 2 Watchers
  • 4 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel commentary

A package for Laravel to post a comment on an article and to manage them., (*1)

Description

This package comes with 3 parts:, (*2)

  • comment form
  • comment listing
  • comment management

The form allows anyone to post a comment on something. It can be applied to any view. The same goes for ther comment listing., (*3)

The comment management allows someone to, (*4)

  • approve
  • unapprove
  • edit
  • trash

comments., (*5)

Screenshots

Form

form, (*6)

Management

management, (*7)

Implementation

ServiceProvider

'Alexwenzel\LaravelCommentary\LaravelCommentaryServiceProvider', (*8)

Namespace

The package registers the following namespace: laravel-commentary, (*9)

Migration

php artisan migrate --package="alexwenzel/laravel-commentary"

The migration creates a table named: laravel-commentary-comments, (*10)

Comment controllers

There is a controller to manage the comments, and there is a controller for the frontend stuff. The management controller is best behind a secured route., (*11)

Include something like the following line in your routes.php:, (*12)

/**
 * Comment Management
 */
Route::controller('commentsmanagement', 'Alexwenzel\LaravelCommentary\ManagementController');

/**
 * Comment Frontend
 */
Route::controller('commentsfrontend', 'Alexwenzel\LaravelCommentary\FrontendController');

If you need to customize the management section, override the views within your project., (*13)

Comment form

To display the comment form, include something like the following line in your view:, (*14)

{{ View::make('laravel-commentary::comment-form', array('entity'=>'my_article_id')) }}

Register the controller first, otherwise you will get errors., (*15)

Comment listing

To display the comments of an entity, include something like the following line in your view:, (*16)

{{ View::make('laravel-commentary::comment-list', array('entity'=>'my_article_id')) }}

Register the controller first, otherwise you will get errors., (*17)

The following conditions are applied to the comment listing. Comments:, (*18)

  • have to be approved
  • are ordered by creation time

Comment controller behaviour

The behaviour can be customized by overriding CommentaryActionHandler class., (*19)

Events

The following events are fired:, (*20)

laravel-commentary.comment-posted // first parameter is the comment
laravel-commentary.comment-approved // first parameter is the comment
laravel-commentary.comment-unapproved // first parameter is the comment
laravel-commentary.comment-trashed // first parameter is the comment

Assets

This package comes with default styles., (*21)

php artisan asset:publish alexwenzel/laravel-commentary

Localization

Read here: http://laravel.com/docs/localization#overriding-package-language-files, (*22)

The Versions

02/09 2014

dev-develop

dev-develop

A package for Laravel to post a comment on an article and to manage them.

  Sources   Download

The Requires

 

by Avatar alexwenzel

laravel comments

02/09 2014

dev-master

9999999-dev

A package for Laravel to post a comment on an article and to manage them.

  Sources   Download

The Requires

 

by Avatar alexwenzel

laravel comments

01/09 2014

v1.0.1

1.0.1.0

A package for Laravel to post a comment on an article and to manage them.

  Sources   Download

The Requires

 

by Avatar alexwenzel

laravel comments

20/08 2014

v1.0.1-alpha

1.0.1.0-alpha

A package for Laravel to post a comment on an article and to manage them.

  Sources   Download

The Requires

 

by Avatar alexwenzel

laravel comments

19/08 2014

v1.0.0-alpha

1.0.0.0-alpha

A package for Laravel to post a comment on an article and to manage them.

  Sources   Download

The Requires

 

by Avatar alexwenzel

laravel comments