Inversion of control and dependency injection in Laravel source code analysis

concept Inversion of Control (IoC) is a design principle in object-oriented programming, which can be used to reduce the coupling between computer codes. It is a programming idea, which can let us design better programs. Dependency injection (DI) is a way to realize IOC. By this way, we can transf ...

Posted on Sat, 22 Feb 2020 01:38:45 -0500 by mickwaffle

Working mechanism of Facade in Laravel

We know that Facade pattern is a mediation class, which encapsulates and proxies subsystems or class objects, and provides a unified high-level interface for a group of interfaces of subsystems. It exposes the function of the subsystem, but does not expose the object of the subsystem. When the user wants to use a function (method) of the subsys ...

Posted on Tue, 07 Jan 2020 03:15:46 -0500 by richarro1234

How to implement message queuing in php and redis

The request processing of instant server is replaced by asynchronous processing, which can relieve the pressure of server and achieve data sequential acquisition. This article mainly shares with you how php and redis realize message queuing, hoping to help you.   The steps for redis to implement message queuing are as follows: 1) . redis functi ...

Posted on Tue, 24 Dec 2019 12:59:18 -0500 by Smruthi

Some practical Laravel tips

There are some common tips in Laravel, maybe you can use them. 1. Sidebar Generally, websites have sidebars to display categories, labels, hot articles, hot comments, etc., but these sidebars are relatively independent modules. If data related to views are imported separately in each view that introduces sidebars, it is too redundant. So the be ...

Posted on Fri, 20 Dec 2019 10:29:02 -0500 by themire

Basic process of developing Laravel extension

Create an empty laravel project composer create-project --prefer-dist laravel/laravel pkg In the new laravel project, create the following directory: qiangzhiwang\testpkg\src. The packages directory and app directory are the same level. The code of our development package is placed in this src directory. Qiangzhiwang and testpkg are completely ...

Posted on Sat, 14 Dec 2019 09:18:13 -0500 by LiquidEagle

PHP ID generator based on snowflake algorithm

Snowflake is an ID generation algorithm in Twitter. It can generate unique ID numbers in large-scale distributed situation by some simple rules. It consists of: The first bit is the unused symbol bit. The second part is composed of 41 bit time stamp (MS), whose value is the offset of the current time relative to a certain time. The five bit s ...

Posted on Tue, 10 Dec 2019 13:28:56 -0500 by austingecko

Install supervisor under centos

1. Install supervisor Execute the following command yum install python-setuptools easy_install supervisor perhaps #If easy install doesn't work, download it from the official website: wget https://pypi.python.org/packages/80/37/964c0d53cbd328796b1aeb7abea4c0f7b0e8c7197ea9b0b9967b7d004def/supervisor-3.3.1.tar.gz #Then install through python: tar ...

Posted on Mon, 09 Dec 2019 08:24:40 -0500 by ibolui

Case 1 of the actual development of the project using swoole in Laravel (establishing swoole and front-end communication)

1 environment required for development Sharp tools make good work. Before the formal development, we should check the expansion that needs to be installed, do not find these problems in the development, and interrupt our thinking to affect our development efficiency. Install swoole expansion pack Install redis expansion pack Install laravel ve ...

Posted on Sun, 08 Dec 2019 23:47:40 -0500 by wolfcry044

Elegant Oss Flysystem extension

First link If you think it helps you, save your time and remember Star yo iidestiny/flysystem-oss iidestiny/laravel-filesystem-oss "laravel users use this directly" Preface Many oss extension packages have been used before, but none of them are easy to use. Some extension packages are too complex to be configured. Some extension p ...

Posted on Sun, 08 Dec 2019 16:24:56 -0500 by jcampbell1

The beginning of LSP client API

Create a new Laravel project and synchronize git $ valet restart $ cd ~/Sites $ laravel new Lsp-api-user Visit http://Lsp-api-user.test/, creation succeeded. $ cd ~/Sites/Lsp-api-user $ git checkout -b api-user $ git init $ git add . && git commit -m "Initial commit" $ git remote add origin git@git.coding.net:qbgugu/Lsp.git $ git pull ...

Posted on Sun, 08 Dec 2019 08:52:05 -0500 by sixdollarshirt