Home >Backend Development >PHP Tutorial >Does Laravel no longer need the Dao and Service layers, and only needs a Model?
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?
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:
ORM
layerDB
layerPDO
layer