Repository vs service design pattern

Nguyen Hoang - Oct 2 - - Dev Community

Repository design pattern: use to call model - eloquent - CRUD,
Ex:

  • saveMessage
  • deleteMessage
  • ....

Service design pattern: call to Repository (many)
Ex:

  • transaction is place here
  • if service is complicated -> create small service
. . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player