PHP code example of tormjens / posteio

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

    

tormjens / posteio example snippets


    'TorMorten\Posteio\Providers\PosteioServiceProvider',

    'Posteio' => TorMorten\Posteio\Posteio::class,

    'posteio' => [
        'host' => 'https://myhost.com',
        'username' => '[email protected]',
        'password' => 'secret'
    ],

$posteio = new TorMorten\Posteio\Client('https://myhost.com', '[email protected]', 'secret');
 
Route::post('create-account', function(TorMorten\Posteio\Client $posteio) {
    $posteio->boxes()->create(['name' => 'John Doe', 'email' => '[email protected]']);
});

app('posteio')->boxes()->create(['name' => 'John Doe', 'email' => '[email protected]']);
// or
app('TorMorten\Posteio\Client')->boxes()->create(['name' => 'John Doe', 'email' => '[email protected]']);