Basic components


route

Getting Started with Routing The most basic Laravel route only receives one URI and one closure, and provides a very simple and elegant route definition method based on this: Route...

Published by Xueyuan Jun 5 years ago    Views: 37077    Like: 8

middleware

brief introduction Middleware provides a convenient mechanism for filtering HTTP requests entering applications. For example, Laravel has a built-in middleware to verify whether the user has been authenticated (such as login

Published by Xueyuan Jun 5 years ago    Views: 23908    Like: 11

CSRF protection

brief introduction Cross site request forgery (CSRF) is a malicious vulnerability that attacks credit websites by masquerading requests from authorized users. Larave protects the middle through its own CSRF

Published by Xueyuan Jun 5 years ago    Number of views: 19624    Number of likes: 5

controller

brief introduction Our previous demonstration examples all put all the request processing logic in the closure function of the routing file, which is obviously unreasonable. We need to use the controller class to organize and manage relatively complex industries

Published by Xueyuan Jun 5 years ago    Views: 22318    Number of likes: 3

HTTP Request

Access Request Instance To get the current HTTP request instance in the controller, you need to enter the Illuminate Http Request class in the constructor or method

Published by Xueyuan Jun 5 years ago    Number of views: 21043    Number of likes: 5

HTTP Response

Create Response String&Array All routes and controllers will return a response to the user's browser after processing the business logic

Published by Xueyuan Jun 5 years ago    Views: 16040    Number of likes: 2

view

Create View Note: Want to know how to write a Blade template? Please check the Blade documentation first. The view contains the applied HTML code, and the applied controller

Published by Xueyuan Jun 5 years ago    Views: 15630    Like: 6

URL generation

brief introduction Laravel provides several auxiliary functions to help us generate URLs in applications. These functions are mainly used to build links in view templates and API responses, or generate

Published by Xueyuan Jun 5 years ago    Views: 13830    Number of likes: 0

Session

brief introduction Since the HTTP protocol itself is stateless, the last request is not associated with the next request. Therefore, we introduce a session to store the user request information to solve the problem

Published by Xueyuan Jun 5 years ago    Views: 16224    Number of likes: 4

Form Validation

brief introduction Laravel provides several methods to validate the request input data. By default, the controller base class of Larave uses ValidatesRequests

Published by Xueyuan Jun 5 years ago    Views: 37205    Number of likes: 4

error handling

brief introduction By default, Larvel has configured error and exception handling for us. We will trigger an exception in the App Exceptions Handler class and the

Published by Xueyuan Jun 5 years ago    Views: 15075    Number of likes: 2

journal

brief introduction In order to help you learn more about what happened in the application, Laravel provides a powerful log service to record log information to files, system error logs, and even SL

Published by Xueyuan Jun 5 years ago    Views: 20299    Number of likes: 0

search result