PHP code example of tetra7 / laravel-error-issue-creator

1. Go to this page and download the library: Download tetra7/laravel-error-issue-creator 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/ */

    

tetra7 / laravel-error-issue-creator example snippets


return [

    // GitHub personal access token (scope: issues: read & write)
    'github_token'    => env('GITHUB_TOKEN'),

    // GitHub repository (format: owner/repository)
    'repository'      => env('GITHUB_REPO'),

    // Labels to apply on new issues
    // Provide a comma-separated list in .env, e.g. "bug,production-error"
    'labels'          => explode(',', env('GITHUB_LABELS', 'bug')),

    // Cache TTL in seconds to prevent duplicate issues
    'cache_ttl'       => env('ERROR_ISSUE_CACHE_TTL', 3600),

];

// routes/web.php

Route::get('/test-error-dup', function () {
    throw new Exception('Fixed error for dedupe test');
});
bash
php artisan vendor:publish \
    --provider="Tetra7\ErrorIssueCreator\ErrorIssueServiceProvider" \
    --tag=config
bash
      php artisan queue:work