Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ge-tracker/octane-helpers
Helper code for Laravel Octane installations
https://github.com/ge-tracker/octane-helpers
Last synced: 11 days ago
JSON representation
Helper code for Laravel Octane installations
- Host: GitHub
- URL: https://github.com/ge-tracker/octane-helpers
- Owner: ge-tracker
- Created: 2022-10-16T07:44:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T12:04:38.000Z (over 1 year ago)
- Last Synced: 2024-04-21T09:54:42.513Z (7 months ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Octane Helpers
This package will provide some basic functionality to our various Laravel Octane projects.
## Installation
```bash
$ composer require ge-tracker/octane-helpers
```After installation, the `BootApplication` class should be added to the `RequestReceived` listener in `octane.php`:
```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