Home > Backend Development > PHP Tutorial > Does Laravel no longer need the Dao and Service layers, and only needs a Model?

Does Laravel no longer need the Dao and Service layers, and only needs a Model?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-04 09:20:58
Original
2659 people have browsed it

I was learning Laravel and found that Laravel directly uses the Model to query the database data and return it. Does that mean: Laravel does not need the Dao and Service layers, and only needs a Model?

Reply content:

I was learning Laravel and found that Laravel directly uses the Model to query the database data and return it. Does that mean: Laravel does not need the Dao and Service layers, and only needs a Model?

Laravel’s ORM adopts the ActiveRecord mode, which can be basically divided into the following three layers: upper, middle and lower. Among them, the DB layer should be the DAO layer in the traditional sense. It is also often used in actual projects. To this level:

ORMlayer

DBlayer

PDOlayer

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Composer cannot install laravel
From 1970-01-01 08:00:00
0
0
0
Laravel Space/laravel-backup cannot be installed
From 1970-01-01 08:00:00
0
0
0
Laravel 5.1 Login laravel comes with it No more
From 1970-01-01 08:00:00
0
0
0
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template