1. Go to this page and download the library: Download byrcsc/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/ */
byrcsc / laravel-comments example snippets
use ByRcsc\LaravelComments\Concerns\HasComments;
class Post extends Model
{
use HasComments;
}
$comment = $post->comment('Great write-up!', by: $user);
$reply = $comment->reply('Agreed, especially the last section.', by: $teammate);
$comment->react('👍', by: $teammate);
$guest = $post->commentAsGuest(
'Where can I download the slides?',
name: 'Jane',
email: '[email protected]',
);
$guest->approve(by: $moderator);