IV. Basic Component - Controller
- Restore content to start
brief introduction
Previous demonstrations have shown that placing all request processing logic in the closure function of the routing file is obviously unreasonable. We need to use the controller class to organize and manage relatively complex business logic processing. Controllers are used to encapsulate related H ...
Posted by witham on Sun, 28 Jul 2019 02:56:12 -0700
Laravel jumps back to the page he visited before signing in
1. Jump to login page after Auth middleware check
That is, they fail the authentication check of the auth middleware, are intercepted by the auth middleware, and then jump to the login page.In this case, Laravel automatically jumps back to the page that was browsed before the user logged in by default.How does auth middleware do this?
Open th ...
Posted by bobcooper on Sat, 20 Jul 2019 10:09:54 -0700
Decorator Pattern With Laravel Decorator Mode
Decorator Pattern s Decorator Model
Outline:
1. A beginner's doubts
2. Characteristics of Decorator Model
3. Simple case Masters Decorator Mode
4. Application of Decorator Mode in Laravel
Confusing: Before I started to study the source code of laravel, I knew little about Decorator Mode, but when I created a middleware, I still did ...
Posted by kratos-2012 on Thu, 11 Jul 2019 11:32:39 -0700
[Laravel 5] Auth component rewrite password authentication for MD5 encryption
After learning Laravel soon, there are many obstacles. We organize some understanding on Auth components, and rewrite some debugging process of encryption for MD5 in Auth component password authentication mode, and share it with other beginners of Laravel.
Requirement description
Because the project is an old one, some data need to be migrat ...
Posted by mattm1712 on Tue, 02 Jul 2019 13:24:43 -0700
Laravel privilege control collation--Auth
User authentication
1. Customer Authentication
brief introduction
Laravel makes it very easy to implement authentication mechanisms. In fact, almost all settings are done by default. Configuration files for authentication are placed in config/auth.php, and they also contain good annotations describing the corresponding authentication se ...
Posted by keithh0427 on Tue, 18 Jun 2019 17:14:29 -0700
Build your own PHP framework -- Build a template engine (3)
Previously, we implemented the simplest template replacement for echo commands, which is to replace {$name} with <? PHP echo $name?>.
Now let's go through the other commands and review the previous definitions.
Output variable value
The return value of the {{}} expression will be automatically passed to the htmlentities function of PHP ...
Posted by Randuin on Tue, 11 Jun 2019 15:27:37 -0700
[Tutorial] Vernacular Laravel Middleware
The article is transferred from: https://learnku.com/laravel/t...
What is Laravel middleware?
In short, the role of Middleware in laravel is to filter HTTP requests and perform different logical operations according to different requests.
We can achieve the following functions through middleware:
Specify certain routes
Setting up HTTP respo ...
Posted by NoPHPPhD on Thu, 09 May 2019 11:30:39 -0700
Laravel installs jenssegers/laravel-mongodb extensions and pits encountered
mongoDB was used in the project, so you went to the largest gay dating website and found the most stars jenssegers/laravel-mongodb
Package Installation
1. Based on README, find the package version corresponding to the local laravel2. Introduce using composer requir ing in development environment
3. Configure config/app.php
/*
...
Posted by RedMaster on Wed, 08 May 2019 23:36:39 -0700
How to access Github landing
The Benefits of Accessing github
One-click login, user experience is good (for programmers only)
Application is simple, if it is to apply for QQ landing or micro-blog landing (a meal of verification is as fierce as tiger, ID card photography, phone calls... all kinds of)
Easy to use and easy to learn
Log on ...
Posted by koglakci on Sat, 20 Apr 2019 14:36:33 -0700
laravel queue instance
Introducer
Before writing Event/listener For instance, the data is directly stored, and this step can be put into the queue to execute. The laravel queue has multiple drivers to choose from, and redis is used here.
Create queue
Using php artisan make:job BrowseLogQueue, you can create a queue file and eventually generate a Jobs/BrowseLogQueue. ...
Posted by richmlpdx on Fri, 12 Apr 2019 22:00:32 -0700