PHP code example of composite / laravel-tecdoc

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

    

composite / laravel-tecdoc example snippets


'providers' => [
    ...
    /*
     * Package Service Providers...
     */
    Composite\TecDoc\TecDocServiceProvider::class,
    ...
],

'aliases' => [
    ...
    'TecDoc' => Composite\TecDoc\Facades\TecDoc::class,
    ...
],



return [

    /*
    |--------------------------------------------------------------------------
    | TecDoc service url
    |--------------------------------------------------------------------------
    |
    | The service url of TecDoc REST API
    |
    */

    'service_url' => env('TEC_DOC_SERVICE_URL', "https://webservice.tecalliance.services/pegasus-3-0/services/TecdocToCatDLB.jsonEndpoint"),
    
    /*
    |--------------------------------------------------------------------------
    | API key (optional if IP is whitelisted)
    |--------------------------------------------------------------------------
    |
    | The user's API key for TecDoc REST API service.
    |
    */

    'api_key' => env('TECDOC_API_KEY'),
    
    /*
    |--------------------------------------------------------------------------
    | Provider ID
    |--------------------------------------------------------------------------
    |
    | The user's provider ID for TecDoc REST API service
    |
    */
    
    'provider_id' => env('TECDOC_PROVIDER_ID'),
    
    /*
    |--------------------------------------------------------------------------
    | Country code (ISO 3166)
    |--------------------------------------------------------------------------
    |
    | The user's registered country code (Country code according to ISO 3166)
    |
    */
    
    'country' => env('TECDOC_COUNTRY'),
    
    /*
    |--------------------------------------------------------------------------
    | Language code (ISO 639)
    |--------------------------------------------------------------------------
    |
    | Chosen language code for response (Language code according to ISO 639)
    |
    */
    
    'lang' => env('TECDOC_LANG'),
     
];

TecDoc::get(string $uri, array $payload = []);

TecDoc::post(string $uri, array $payload = []);

TecDoc::put(string $uri, array $payload = []);

TecDoc::delete(string $uri, array $payload = []);

TecDoc::manufacturers()->all(array $filter = null);

TecDoc::modelSeries()->findByNumber(int $manuId, array $filter = null);

TecDoc::vehicles()->find(int $carId, array $filter = null);

TecDoc::vehicles()->findByNumber(int $manuId, int $modId, array $filter = null);

TecDoc::articles()->filter(array $filter);

TecDoc::articles()->find(int $articleId, array $filter = null);

TecDoc::articles()->findByNumber(int $articleNumber, array $filter = null);

TecDoc::addresses()->add(string $address, int $validityHours = null);

TecDoc::assemblyGroups()->filter(int $linkingTargetId, string $linkingTargetType = null, array $filter = null, bool $recursive = false);
bash
php artisan vendor:publish --provider="Composite\TecDoc\TecDocServiceProvider" --tag=config