Install swoole extension Two methods to install php extension swoole Check whether the Swoole PHP extension is enabled on the server php -i | grep swoole 1. Install using pecl command pecl install swoole 2. Manual compilation and installation Use the following command to download the swoole installation package git clone https://github.com/swoole/swoole-src.git Unzip the source […]
Tag: laravel
laravel integrates Workerman to build websocket service, front-end call, server startup
This article has relatively complete integration code and front-end test code, as well as server startup considerations. 1. Backend (laravel5.5) 1. Composer installs Workerman composer require workerman/workerman 2. Generate an execution command. After execution, a Workerman.php file will be generated in the App\Console\Command folder. php artisan make:command Workerman 3. Open the Workerman.php file and modify […]
uni-app combines with laravel to achieve no login required
I recently discovered a very interesting thing, the points mall without logging in. After careful study and analysis, I came to the conclusion that no matter it is in the mall or anything else, you can play it without logging in. The principle is also very simple. The browser has a fingerprint ID, and the […]
Laravel6 uses Workerman’s Gateway-worker for long-term connection communication
1. Install gateway-worker gateway-worker which has been introduced workerman/workerman. composer require worker/gateway-worker composer require worker/gatewayclient 2. Create Workerman startup file Create an artisan command line tool to start the Socket server, and create a command line file in the app/Console/Commands directory. php artisan make:command GatewayWorkerServer
python parsing laravel cookie
– I’m learning fastapi recently, and there happens to be a crawler project that I need to develop. The company’s previous technology stack was PHP, and the old online projects were all written in laravel. I know all about laravel’s performance. It’s really hard to look at, but the development speed is really fast. Fastapi […]
Laravel Framework – Middleware
What is middleware? In the Laravel framework, middleware is a component used to handle HTTP requests. It allows you to execute some code logic before or after the request enters routing processing. Advantages and functions of middleware Handle authentication: verify that the user is logged in or check if the user has permission to access […]
Laravel automatically generates model service controller scripts through commands (model with annotations)
Yii can automatically generate models through data tables. In order for laravel to achieve the same function, the following script was written. Service controllers can also be automatically generated, and the model has automatic validation rules based on data table types. 1. Create a new app/Console/Commands/MakeMCS.php file. Copy the following code into <?php namespace App\Console\Commands; […]
PHP – Laravel form validation (validation rules and use of $this->validate(), Validator::make(), Requests)…
1. Introduction Form verification is to prevent system security problems caused by visitors skipping client verification. Once illegal users bypass client verification without verification on the server, it is very unsafe, so Projects must perform server-side form validation. Laravel provides a variety of different validation methods to validate data passed in by the application. Commonly […]
Laravel Framework – Artisan Commands
Table of Contents 1. Prepare in advance 1.1 Operation process 1.2 How to open the terminal 2. Laravel common commands 2.1 View all available commands 2.2 View help commands 3. Custom commands 3.1 Generate command 4. Customize the format of input parameters 4.1 Custom parameters 4.2 Custom options does not receive value receive value 4.3 […]