If you want to get user's contacts attached with gmail, this package will save your time a lot.
You can install the package via composer:
composer require minhajul/contact-exporter
You can publish and run the config file by running the below command:
php artisan vendor:publish --provider="Minhajul\ContactExporter\ContactExporterServiceProvider" --tag="config"
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');
});
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.