March 2019
Intermediate to advanced
394 pages
11h 4m
English
Laravel is one of the most widely-used MVC frameworks for PHP, similar in architecture to Django and Rails from the Python and Ruby worlds respectively. We will follow through configuring our models using Laravel, Doctrine, and MongoDB. This section assumes that Doctrine is installed and working with Laravel 5.x.
Doctrine entities are Plain Old PHP Objects (POPO) that, unlike Eloquent, Laravel's default ORM doesn't need to inherit from the Model class. Doctrine uses the Data Mapper Pattern, whereas Eloquent uses Active Record. Skipping the get() and set() methods, a simple class would be shown in the following way:
use Doctrine\ORM\Mapping AS ORM;use Doctrine\Common\Collections\ArrayCollection;/*** @ORM\Entity* @ORM\Table(name="scientist") ...
Read now
Unlock full access