PHP code example of andach / laravel-attachments-comments

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

    

andach / laravel-attachments-comments example snippets

bash
php artisan attachments-comments:install
 
$model = new MyModel();

foreach ($model->attachments as $attachment)
{
    // ...
}

foreach ($model->comments as $comment)
{
    // ...
}