1. Go to this page and download the library: Download vigstudio/vgcomments library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vigstudio / vgcomments example snippets
/*
|--------------------------------------------------------------------------
| Route Prefix
|--------------------------------------------------------------------------
|
| This is the URI path where VgComment will be accessible from. Feel free to
| change this path to anything you like.
|
*/
'prefix' => 'vgcomment',
/*
|--------------------------------------------------------------------------
| Database Connection
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all of your database work.
|
*/
'connection' => env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Name of Tables in Database
|--------------------------------------------------------------------------
|
| This is the name of the table that will be created by the migration and
| used by the Comment model shipped with this package.
|
| "comments" : Comments Table
| "files" : Files Attachment Table
| "reactions" : Reactions Table
| "reports" : Reports Table
| "settings" : Settings Table
|
*/
'table' => [
'comments' => 'vgcomments',
'files' => 'vgcomment_files',
'reactions' => 'vgcomment_reactions',
'reports' => 'vgcomment_reports',
'settings' => 'vgcomment_settings',
],
/*
|--------------------------------------------------------------------------
| Column of User Table for get Data
|--------------------------------------------------------------------------
|
| This is the setting for column of user table for get data.
| "user_column_name" : Column name for get name user
| "user_column_email" : Column name for get email user
| "user_column_url" : Column name for get url user
|
*/
'user_column_name' => 'name',
'user_column_email' => 'email',
'user_column_url' => 'url',
'user_column_avatar_url' => 'avatar_url',