PHP code example of ge-tracker / octane-helpers

1. Go to this page and download the library: Download ge-tracker/octane-helpers 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/ */

    

ge-tracker / octane-helpers example snippets


'listeners' => [
    ...
    
    RequestReceived::class => [
        ...Octane::prepareApplicationForNextOperation(),
        ...Octane::prepareApplicationForNextRequest(),
        \GeTracker\OctaneHelpers\Listeners\BootApplication::class,
    ],



namespace GeTracker\OctaneHelpers\Http\Controllers;

class ServerTimeController extends OctaneController
{
    public function getServerTime()
    {
        return time();
    }
}


use GeTracker\OctaneHelpers\Facades\OctaneRoute;

OctaneRoute::get('/api/server-time', [ServerTimeController::class, 'getServerTime']);