当前位置:网站首页>Using the collaboration database query of Poole in laravel5.6
Using the collaboration database query of Poole in laravel5.6
2022-06-24 11:09:00 【PHP Development Engineer 】
What is? Swoole
Direct application Swoole Introduction to the official website :PHP The asynchronous 、 parallel 、 High performance network communication engine , Use pure C Language writing , Provides PHP Asynchronous multithreaded server of language , asynchronous TCP/UDP Network client , asynchronous MySQL, asynchronous Redis, Database connection pool ,AsyncTask, Message queue , Millisecond timer , Asynchronous file read and write , asynchronous DNS Inquire about . Swoole Built in Http/WebSocket Server side / client 、Http2.0 Server side .
Swoole The documents on the official website are not rich enough , It's a headache , But most of the questions explain . If you are right about Swoole Very interested , So look at this Swoole Introductory tutorial .Swoole Provides multithreading 、 Long connection and many other awesome functions , hold php Up to a new level , You can take a look at the introductory tutorial , This article is limited to Laravel and Swoole The combination of .
Swoole In order to provide services , Must be CLI mode , What is? CLI How about the model ? If you Swoole The business code is written in a file called server.php In the file of , Then enter... At the command line php server.php Turn on . This is a headache , because Laravel This is not how the framework works , How can we Laravel Union ? you 're right , Customize one Artisan Command, It's that simple .
Highly recommended in your laravel In the project , Use laravel-s This package .
composer require "hhxsv5/laravel-s:~1.0" -vvv
then , rely on kuaiapp/db This package , The function is to achieve Swoole\Coroutine\MySQL False of PDO Interface
composer require "kuaiapp/db" -vvv
to vendor/laravel/framework hit patch
cd .//vendor/laravel/framework wget https://gist.githubusercontent.com/xiaohuilam/81ae50c1bc06180bd8e6fcbdaadba86a/raw/529cb96ca9abeed7a35076725b3b5cd8a1e04ff7/git.patch git am < git.patch
start-up laravel-s
php artisan laravels start
Now you can test your database queries .
The above is the whole content of this paper , I hope it will be helpful for your study , I also hope you can support open source .
Complete example :http://github.crmeb.net/u/defu
come from “ Open source world ” , link :https://ym.baisou.ltd/post/680.html, If you want to reprint , Please indicate the source , Otherwise, the legal liability will be investigated .
边栏推荐
- Rising bubble canvas breaking animation JS special effect
- Dedecms template file explanation and homepage label replacement
- A group of skeletons flying canvas animation JS special effect
- "One good programmer is worth five ordinary programmers!"
- 喜歡就去行動
- Suddenly I thought of the wooden house in my hometown
- What is the resource search platform and how resource search works
- System design: key features of distributed systems
- How to make a good video? What are the operation methods?
- Group policy export import
猜你喜欢

【本周六活动】.NET Day in China

Differences among cookies, session, localstorage and sessionstorage
![[graduation season · attacking technology Er] three turns around the tree, what branch can we rely on?](/img/0a/0ebfa1e5c1bea6033b538528242252.png)
[graduation season · attacking technology Er] three turns around the tree, what branch can we rely on?

“一个优秀程序员可抵五个普通程序员!”

喜欢就去行动

Beauty of script │ VBS introduction interactive practice

TP-LINK 1208路由器教程(2)

如何开发短信通知和语音功能医院信息系统(HIS系统)

计组_cpu的结构和工作流程

今日睡眠质量记录76分
随机推荐
Which is a good CAD drawing software? How to select good software
How to use data analysis tools to deal with emergencies in retail industry
把腾讯搬到云上,治愈了他们的技术焦虑
常用的第三方ui框架
H5 video conference, camera monitoring, web streaming and live broadcast integration scheme
Many of my friends asked me what books and online classes I recommended. This time, I contributed all the materials that I had been hiding for a long time (Part 1)
Understanding of homogeneous coordinates
Does the depth system work?
Four methods of object merging and four methods of object merging in JS
今日睡眠质量记录76分
Cook a delicious cli
I pushed my younger brother into Tencent. Look at his benchmark resume!
Group counting_ Structure and workflow of CPU
2D 照片变身 3D 模型,来看英伟达的 AI 新“魔法”!
Fais ce que tu veux.
Programmers spend most of their time not writing code, but...
为什么虚拟机ping的通主机,主机ping不通虚拟机
“一次编写,运行各端”,高通重磅发布 AI 软件栈!
Tencent geek challenge small - endless!
@RequestBody注解