Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

4. Installation

Albert Chen edited this page Apr 29, 2018 · 11 revisions

Installation

Require this package with composer by using the following command:

$ composer require swooletw/laravel-swoole

This package relies on Swoole. Please make sure your machine has been installed the Swoole extension. Using this command to install quickly: pecl install swoole. Visit the official website for more information.

Notice: Swoole currently only supoorts Linux and OSX. Windows servers are not able to use Swoole.

Then, add the service provider:

If you are using Laravel, add the service provider to the providers array in config/app.php:

[
    'providers' => [
        SwooleTW\Http\LaravelServiceProvider::class,
    ],
]

If you are using Lumen, append the following code to bootstrap/app.php:

$app->register(SwooleTW\Http\LumenServiceProvider::class);

It supports package auto discovery. If you're running Laravel 5.5, you can skip this step.

Clone this wiki locally