1. Go to this page and download the library: Download pannella/laravel-cti 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/ */
pannella / laravel-cti example snippets
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Pannella\Cti\Traits\HasSubtypes;
class Assessment extends Model
{
use HasSubtypes;
protected static $subtypeMap = [
'quiz' => AssessmentQuiz::class,
'survey' => AssessmentSurvey::class,
];
protected static $subtypeKey = 'type_id';
protected static $subtypeLookupTable = 'assessment_types';
protected static $subtypeLookupKey = 'id';
protected static $subtypeLookupLabel = 'label';
}