Package Data | |
---|---|
Maintainer Username: | alexwenzel |
Maintainer Contact: | alexander.wenzel.berlin@gmail.com (alexwenzel) |
Package Create Date: | 2014-08-18 |
Package Last Update: | 2014-09-02 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2025-01-11 15:02:05 |
Package Statistics | |
---|---|
Total Downloads: | 43 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 5 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
A package for Laravel to post a comment on an article and to manage them.
This package comes with 3 parts:
The form allows anyone to post a comment on something. It can be applied to any view. The same goes for ther comment listing.
The comment management allows someone to
comments.
'Alexwenzel\LaravelCommentary\LaravelCommentaryServiceProvider'
The package registers the following namespace: laravel-commentary
php artisan migrate --package="alexwenzel/laravel-commentary"
The migration creates a table named: laravel-commentary-comments
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.
Include something like the following line in your routes.php
:
/**
* 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.
To display the comment form, include something like the following line in your view:
{{ View::make('laravel-commentary::comment-form', array('entity'=>'my_article_id')) }}
Register the controller first, otherwise you will get errors.
To display the comments of an entity, include something like the following line in your view:
{{ View::make('laravel-commentary::comment-list', array('entity'=>'my_article_id')) }}
Register the controller first, otherwise you will get errors.
The following conditions are applied to the comment listing. Comments:
The behaviour can be customized by overriding CommentaryActionHandler
class.
The following events are fired:
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
This package comes with default styles.
php artisan asset:publish alexwenzel/laravel-commentary
Read here: http://laravel.com/docs/localization#overriding-package-language-files