PHP code example of richardstyles / laravel-vapor-support

1. Go to this page and download the library: Download richardstyles/laravel-vapor-support 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/ */

    

richardstyles / laravel-vapor-support example snippets


return [
    'warning_size' => env('VAPOR_SUPPORT_RESPONSE_WARNING_SIZE', 5000000),
    'warning_action' => \RichardStyles\LaravelVaporSupport\Actions\ResponseSizeWarning::class,


    'limit_size' => env('VAPOR_SUPPORT_RESPONSE_LIMIT_SIZE', 6000000),
    'limit_action' => \RichardStyles\LaravelVaporSupport\Actions\ResponseSizeLimit::class,

    'stream_action' => \RichardStyles\LaravelVaporSupport\Actions\StreamResponseMonitor::class,
];


protected $middlewareGroups = [
        'web' => [
             ...
            \RichardStyles\LaravelVaporSupport\Http\Middleware\ResponseLimitMonitor::class,
        ],
        ...

protected $routeMiddleware = [
        ...
        'response.monitor' => \RichardStyles\LaravelVaporSupport\Http\Middleware\ResponseLimitMonitor::class,
    ];
bash
php artisan vendor:publish --tag="laravel-vapor-support-config"