php - Is an Eloquent Model the same as a MVC model (in laravel)? -


i saw post (the difference between eloquent model , model?) doesn't explicitly answer question me.

i may not using right terminology here...

i understand eloquent "...an activerecord implementation working database..." says in documentation. not clear me difference between these eloquent models, , models 1 refers them in mvc sense.

does sound logical if in particular laravel application

  1. there many models, of eloquent models, , of models in mvc sense.
  2. eloquent models quite lean , pure classes, allowing interaction database layer.
  3. mvc models, comparison may contain sorts of business rules & logic
  4. both types created php artisan make:model although eloquent model 1 might want create migration @ same time.
  5. all models stored in same place, unless otherwise organised. it's not if there externally visible location or naming convention indicate eloquent model, or mvc model.

...is right?

  1. there models. of them have extended functionality using object-relational mapping methodology - eloquent ( 1 of many ).you can read more orm here:

https://en.wikipedia.org/wiki/object-relational_mapping

  1. they not lean , pure. far blown , use lot of unnecessary data create relations between database object in form of easy read / use syntax. example firstmodel->secondmodel->thirdmodel->somethingsilly();

  2. mvc models can contain controller but answer convention should read more extensively mvc , logic behind it.

  3. pretty that's purpose of artisan. make more simple , easy use.

  4. yep.

if need bit more information can provide answers , url in comment below.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -