PHP code example of sharpapi / laravel-content-proofread

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

    

sharpapi / laravel-content-proofread example snippets


return [
    'api_key' => env('SHARP_API_KEY'),
    'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
    'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
    'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
    'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
];

use SharpAPI\ContentProofread\ContentProofreadService;

$service = new ContentProofreadService();

// Proofread text
$proofreadText = $service->proofread(
    'This text has some gramatical errors and typos that need to be corected.'
);

// $proofreadText will contain the corrected text as a string
bash
php artisan vendor:publish --tag="sharpapi-content-proofread"