PHP code example of econtract / crm

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

    

econtract / crm example snippets



    'providers'             => array(

        //...
        \Econtract\Crm\CrmServiceProvider::class,

    )



    'facades'               => array(

        //...
        'Crm'                   => \Econtract\Crm\Facades\Crm::class,

    ),



    $contract = Crm::getContract( 63 );

    $input = array(
        'producttype'                   => 'gas',
        'product_id'                    => 12,
        'supplier_id'                   => 5,

        'new_connection'                => false,
        'activation_date'               => '2015-03-19',
        'install_date'                  => '2015-03-17',

        'send_confirmation_mail'        => true,
    );

    $contract = Crm::createOrder( $input );



     use Econtract/Crm/CrmService;


    $dotenv = new Dotenv\Dotenv(__DIR__);
    $dotenv->load();


    $crmService = new CrmService();
    $contract = $crmService->getContract( 63 );