Installation

Prerequisites

This guide assumes that you already know how to install and configure Laravel.

Install Ajax Comment System

  1. In your app directory, create a comments folder and extract all the files from the archive you have downloaded from CodeCanyon.
  2. Edit your composer.json file and add the following line to the psr-4 autoload:
    "Hazzard\\Comments\\": "app/comments/src/"

    And this one to your dependencies (require):

    "s9e/text-formatter": "^0.2.1"

    In your terminal/console run composer install.

  3. Add 'Hazzard\Comments\CommentsServiceProvider' to your providers array in config/app.php and run:
    php artisan vendor:publish --provider="Hazzard\Comments\CommentsServiceProvider"

    This command will publish the configuration file (config/comments.php), the assets folder (public/vendor/comments) and the database migrations *.

    Notice: The script assumes that you have already have the users table installed.

  4. Finally, run:
    php artisan migrate
  5. Head over to the Usage section to get started.


* The migrations will add 3 tables comments, comment_votes, comment_options and a role field to your users table. This field will be used to determine if the the authenticated user is an admin or a regular user.

Notice: If your app already has another method to determine that, then delete the ..._add_users_role_column.php migration from the database/migrations directory.

Clone Ajax Comment System Demo

You can clone the demo version from the GitHub repository. Run:

git clone https://github.com/hazzardweb/ajax-comment-system-laravel-demo.git

Now you can continue with the normal installation. This demo requires you to have reCAPTCHA configured.

Requirements and Browser Support

Laravel Comments requires Laravel 5.1.9 and supports the following browsers (desktop and mobile): Chrome, Firefox, Opera, Safari MS Edge and IE9+.