PHP code example of goodjun / azure-luis-php-sdk

1. Go to this page and download the library: Download goodjun/azure-luis-php-sdk 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/ */

    

goodjun / azure-luis-php-sdk example snippets


// from LUIS Profile -> Settings -> Authoring Resources
$primaryKey = '00000000-0000-0000-0000-000000000000';
$location = 'westus';

// Luis Client
$luisClient = new LuisClient($primaryKey, $location);

// create app
$app = new App();
$app->setName('app name')->setDescription('app description');
$appId = $luisClient->createApp($app);

// update app
$luisClient->app($appId)->update('new name','new description');

// delete app
$luisClient->app($appId)->delete();