Home>Article>PHP Framework> How to use Swoole's coroutine database query in Laravel5.6

How to use Swoole's coroutine database query in Laravel5.6

藏色散人
藏色散人 forward
2021-02-24 16:50:28 2236browse

The following tutorial column ofLaravelwill introduce to you the coroutine database query using Swoole in Laravel 5.6. I hope it will be helpful to friends in need!

How to use Swoole's coroutine database query in Laravel5.6

Using Swoole's coroutine database query in Laravel 5.6

Installation

First, confirm that you are using laravel 5.6

Then, you need to rely on the kuaiapp/db package, which is used to implement the pseudo-PDO interface ofSwoole\Coroutine\MySQL

composer require kuaiapp/db:v0.1 -vvv

Changelaravel/framework:"v5.6"tolaravelfy/framework:v5.6.x-dev

composer require laravelfy/framework:v5.6.x-dev -vvv

in your laravel- Start in the swoole command and test the interface with database query.
Such as laravel-s

php laravels start

At this point, the MYSQL coroutine transformation of your laravel project has been successful.


Reference

  • kuaiapp/db(https://github.com/Kuaiapp/swoole-pdo-wrapper)
  • laravelfy/framework(https ://github.com/laravelfy/framework)

The above is the detailed content of How to use Swoole's coroutine database query in Laravel5.6. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete