PHP code example of minhajul / contact-exporter

1. Go to this page and download the library: Download minhajul/contact-exporter 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/ */

    

minhajul / contact-exporter example snippets


use Illuminate\Support\Facades\Route;
use Minhajul\ContactExporter\ContactExporter;

Route::get('your-url', function () {
    // This will redirect you to the gmail callback url 
    return ContactExporter::initiate('google');
});
 
Route::get('your-gmail-callback-url', function () {
    // This below code will return you the array of contacts you have saved in your gmail
    return ContactExporter::getContacts('google');
});
bash
php artisan vendor:publish --provider="Minhajul\ContactExporter\ContactExporterServiceProvider" --tag="config"