PHP code example of mannysoft / laravel-comment

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

    

mannysoft / laravel-comment example snippets

 php
\Actuallymab\LaravelComment\LaravelCommentServiceProvider::class
 bash
$ php artisan vendor:publish
$ php artisan migrate
 php
use Actuallymab\LaravelComment\Models\Comment as LaravelComment;

class Comment extends LaravelComment
{
    // ...
}
 php
class User extends Model 
{
    use CanComment;
  
    protected $fillable = [
        'isAdmin',
        // ..
    ];

    public function canCommentWithoutApprove(): bool
    {
        return $this->isAdmin;
    }

    // ..
}