PHP code example of script-development / kendo-report-tool

1. Go to this page and download the library: Download script-development/kendo-report-tool 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/ */

    

script-development / kendo-report-tool example snippets


use ScriptDevelopment\KendoReportTool\KendoReports;

$report = app(KendoReports::class)->submit(
    title: 'Checkout button unresponsive',
    description: "Clicking \"Pay\" does nothing on the cart page.",
    authorName: 'Jane Customer',     // optional — surfaced as the report's author
);

// $report is the decoded 201 body (id + fields) of the created report.
echo $report['id'];

public function submit(
    string $title,
    string $description,
    ?string $authorName = null,
    array $files = [],
): ?array

use Illuminate\Http\Request;
use ScriptDevelopment\KendoReportTool\KendoReports;

public function store(Request $request): void
{
    app(KendoReports::class)->submit(
        title: (string) $request->input('title'),
        description: (string) $request->input('description'),
        authorName: $request->user()?->name,
        files: $request->file('screenshots', []),   // UploadedFile[] — or string paths
    );
}

use ScriptDevelopment\KendoReportTool\Exceptions\ReportSubmissionException;

try {
    app(KendoReports::class)->submit($title, $description);
    // tell the user it sent
} catch (ReportSubmissionException $e) {
    // tell the user it failed
}
bash
php artisan vendor:publish --tag=report-tool-config