PHP code example of eslamfaroug / laravel_comments

1. Go to this page and download the library: Download eslamfaroug/laravel_comments 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/ */

    

eslamfaroug / laravel_comments example snippets


use EslamFaroug\LaravelComments\Commenter;

class User extends Authenticatable
{
    use Notifiable, Commenter;
}

use EslamFaroug\LaravelComments\Commentable;

class Product extends Model
{
    use Commentable;
}
bash
php artisan vendor:publish --provider="EslamFaroug\LaravelComments\ServiceProvider"
bash
php artisan migrate