# Overall architecture
BeikeShop
uses the industry-renowned Laravel
development framework, making full use of the framework's event processing (Event
), middleware (Middleware
), service provision (ServiceProvider
) and other mechanisms, and adopts the microkernel
design concept for development (try to use plugins
+ Hooks
for secondary development).
# Introduction to Laravel
Laravel
is a concise and elegant PHP development framework that is expressive, easy to understand, and provides powerful tools for developing large and robust applications. In addition, the framework includes common tools and functions such as validation, routing, session, cache, database migration tools, unit testing, etc.
# Introduction to MVC
BeikeShop uses the commonly used MVC
three-tier architecture design based on Laravel
- Model layer, defines the model data table and the relationship between tables, and the data access IO operation is placed in
Repositories
- View layer, that is, UI template, uses blade, please refer to https://laravel.com/docs/9.x/blade
- Controller layer, access
# ServiceProvider
Service Providers
are the central bootstrap for all Laravel
applications. Your application, as well as the Laravel
core services that are bootstrapped by the server, are bootstrapped through service providers.
The boot process can be understood as "what the system does from the time the computer presses the power button to the time it fully enters the desktop".
Generally speaking, we refer to registering
things, including registering service container bindings
, event listeners
, middleware
, and even routing
.
# Plugin
Please check Plugin mechanism
# Hook
Please check Hook Mechanism
← Upgrade Coding style →