PHP code example of whilesmart / eloquent-feedback

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

    

whilesmart / eloquent-feedback example snippets


// config/feedback.php
'forms' => [
    'bug-report' => 'bug',
    'nps' => 'nps',
    'testimonials' => 'testimonial',
],

$this->app->bind(
    \Whilesmart\Feedback\Contracts\SentimentAnalyzer::class,
    \App\Feedback\LlmSentimentAnalyzer::class,
);

use Whilesmart\Feedback\Traits\HasFeedback;

class Workspace extends Model
{
    use HasFeedback; // $workspace->feedback
}
bash
php artisan vendor:publish --tag=feedback-config