PHP code example of gyurobenjamin / closeio-laravel-api

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

    

gyurobenjamin / closeio-laravel-api example snippets


Gyurobenjamin\CloseioLaravelApi\CloseioClient::class

'CloseioClient' => Gyurobenjamin\CloseioLaravelApi\CloseioClient::class

$client = new CloseioClient(); // Create a new Closeio Instance.

list($opportunity, $error) = $client->opportunity->get($id); // Retrieve a single opportunity
list($opportunities, $error) = $client->opportunity->search($whateverString); // List or search for opportunity
list($result, $error) = $client->opportunity->delete($id); // Delete an opportunity
list($opportunity, $error) = $client->opportunity->update($id, $newOpp); // Update an existing opportunity
list($opportunity, $error) = $client->opportunity->create($opp); // Create a new opportunity

$client = new CloseioClient(); // Create a new Closeio Instance.

list($task, $error) = $client->task->get($id); // Retrieve a single task
list($tasks, $error) = $client->task->search($whateverString); // List or search for task
list($result, $error) = $client->task->delete($id); // Delete a task
list($task, $error) = $client->task->update($id, $newTask); // Update an existing task
list($task, $error) = $client->task->create($task); // Create a new task

$client = new CloseioClient(); // Create a new Closeio Instance.

list($user, $error) = $client->user->get($id); // Retrieve a single user
list($users, $error) = $client->user->search($whateverString); // List or search for user
list($result, $error) = $client->user->delete($id); // Delete a user
list($user, $error) = $client->user->update($id, $newUser); // Update an existing user
list($user, $error) = $client->user->create($user); // Create a new user