PHP code example of code-tieumomo / laravel-server-timing

1. Go to this page and download the library: Download code-tieumomo/laravel-server-timing 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/ */

    

code-tieumomo / laravel-server-timing example snippets


return response()->json([])
    ->serverTiming([
        'bootstrap' => [
            'desc' => 'Bootstrap',
            'dur' => 32.552003860474,
        ],
        'app' => [
            'desc' => 'App',
            'dur' => 8,
        ],
        'total' => [
            'desc' => 'Total',
            'dur' => 41.576147079468,
        ],
    ]);

return response(view('work-orders.show', compact('workOrder')))
    ->serverTiming([
        'bootstrap' => [
            'desc' => 'Bootstrap',
            'dur' => 32.552003860474,
        ],
        'app' => [
            'desc' => 'App',
            'dur' => 8,
        ],
        'total' => [
            'desc' => 'Total',
            'dur' => 41.576147079468,
        ],
    ]);