PHP code example of collinped / laravel-aimtell

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

    

collinped / laravel-aimtell example snippets


return [
    'api_key' => env('AIMTELL_API_KEY'), // Required - API Key Provided by Aimtell
    'default_site_id' => env('AIMTELL_DEFAULT_SITE_ID'), // Recommended
    'white_label_id' => env('AIMTELL_WHITE_LABEL_ID'), // Must contact Aimtell for White Label ID
];
bash
php artisan vendor:publish --provider="Collinped\LaravelAimtell\AimtellServiceProvider" --tag="config"
 php
$site = aimtell()->site()
                ->create([
                    'name' => 'Sample Website',
                    'url' => 'collinped.com'
                ]);

$campaigns = aimtell()->site($siteId)
                     ->campaign()
                     ->all();

$campaign = aimtell()->site($siteId)
                    ->campaign()
                    ->find($campaignId);