PHP code example of cognesy / instructor-laravel
1. Go to this page and download the library: Download cognesy/instructor-laravel 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/ */
cognesy / instructor-laravel example snippets
use App\ResponseModels\PersonData;
use Cognesy\Instructor\Laravel\Facades\StructuredOutput;
$person = StructuredOutput::with(
messages: 'John Smith is 30 years old',
responseModel: PersonData::class,
)->get();