当前位置:网站首页>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 .
边栏推荐
- Any 与 TypeVar,让 IDE 的自动补全更好用
- Dedecms template file explanation and homepage label replacement
- What is the function of the graphics card driver? Do you want to update the graphics card driver
- Moving Tencent to the cloud cured their technical anxiety
- Base64 decoding method three ways for non professionals
- 数组怎么转对象,对象怎么转数组
- 突然想到老家的木屋
- math_ Summation and derivation of proportional series & derivation of sum and difference of equal powers / difference between two nth power numbers/
- Five methods of JS array summation
- Why should we make the best use of the external chain in SEO?
猜你喜欢

“一次编写,运行各端”,高通重磅发布 AI 软件栈!

"Write once, run at all ends", Qualcomm released AI software stack!

SQL Server about like operator (including the problem of field data automatically filling in spaces)

Canvas pipe animation JS special effect

Maui的学习之路 -- 开篇

P5.js paper crane animation background JS special effect

Cool interactive animation JS special effects implemented by p5.js

math_等比数列求和推导&等幂和差推导/两个n次方数之差/
![[IEEE publication] International Conference on natural language processing and information retrieval in 2022 (ecnlpir 2022)](/img/d6/8c20944ce354c9619a61a73f2c72b1.png)
[IEEE publication] International Conference on natural language processing and information retrieval in 2022 (ecnlpir 2022)

初识string+简单用法(一)
随机推荐
Cool interactive animation JS special effects implemented by p5.js
A group of skeletons flying canvas animation JS special effect
为什么虚拟机ping的通主机,主机ping不通虚拟机
Why should we make the best use of the external chain in SEO?
Group counting_ Structure and workflow of CPU
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)
如何只导出word文档中的标题?(即将正文内容都删除,只保留标题)B站牛逼
What are the means of network promotion?
把腾讯搬到云上,治愈了他们的技术焦虑
Disaster recovery series (II) -- enterprises' one-stop disaster recovery construction with the help of cloud platform?
[深度学习][pytorch][原创]crnn在高版本pytorch上训练loss为nan解决办法
What does ERP system mean
[IEEE] International Conference on naturallanguageprocessing and information retrieval (ecnlpir 2022)
Why use a firewall? What is the function of firewall?
Besides technology, programmers also need to master a skill - self marketing ability
初识string+简单用法(一)
[latest - lightweight cloud servers - hot sales] new lightweight application server optimization scheme, 1-core 2g5m time limit as low as 99 yuan / year
Four methods of object merging and four methods of object merging in JS
Code is really - omnipotent! Refuse to fight
Lightweight deployment of firefoxsend temporary file sharing service using Tencent cloud