PHP code example of actuallymab / laravel-comment
1. Go to this page and download the library: Download actuallymab/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/ */
actuallymab / 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;
}
// ..
}