PHP code example of webhubworks / inertia-props-stats

1. Go to this page and download the library: Download webhubworks/inertia-props-stats 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/ */

    

webhubworks / inertia-props-stats example snippets


return [
    'enabled' => env('INERTIA_PAYLOAD_SIZE_MEASUREMENT_ENABLED', true),

    'payload_size' => [
        'threshold_in_kb' => (int) env('INERTIA_PAYLOAD_SIZE_THRESHOLD_IN_KB', 500),
    ],

    'throw_exception' => [
        'on_duplicate_keys' => env('INERTIA_PROPS_THROW_EXCEPTION_ON_DUPLICATE_KEYS', true),
        'when_component_props_size_exceed_total_props_size' => env('INERTIA_PROPS_THROW_WHEN_COMPONENT_PROPS_EXCEED_TOTAL_PROPS_SIZE', true),
    ],
];
bash
php artisan vendor:publish --tag="inertia-props-stats-config"