New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ge-tracker/octane-helpers

Helper code for Laravel Octane
17
Install
composer require ge-tracker/octane-helpers
Latest Version:v1.0.1
PHP:^8.0
Laravel:8 · 9 · 10
License:MIT
Last Updated:Jun 18, 2026
Links: GitHub  ·  Packagist
Maintainer: gtjamesa

Octane Helpers

This package will provide some basic functionality to our various Laravel Octane projects.

Installation

$ composer require ge-tracker/octane-helpers

After installation, the BootApplication class should be added to the RequestReceived listener in octane.php:

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

Routing

We can make use of Octane's builtin routing to serve requests that bypass Laravel's router (and middleware) to serve data very fast.

With a basic controller that extends OctaneController:

<?php

namespace GeTracker\OctaneHelpers\Http\Controllers;

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

We can add the following to our web.php routes file:

<?php
use GeTracker\OctaneHelpers\Facades\OctaneRoute;

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

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
v1.0.1 ^8.0 ^8.0|^9.0|^10.0 MIT
v1.0.0 ^8.0 ^8.0|^9.0 MIT