- Now let's use Eloquent, which is the ORM or,…Object Relational Mapper, for the layer of our framework.…You'll see that once again our index.php file…is very simple.…We're not doing any queries or configuration here.…Which is good.…Like many of the examples in this course…I used Composer to install the supporting libraries…in the vendor folder.…You shouldn't have to install any additional…libraries to make use of these examples.…In user.php you'll see we really don't have to do much…beyond setting up the database connection.…We configure it with the database information we need…and the Eloquent RM handles the rest.…
By default it will handle mapping all the fields…from the database to an object or the…other way around.…There's not much else we need to do.…Notice that we didn't even have to specify…which table to use.…By default Eloquent will assume that the table name…is the plural of the class name.…So if you have a class named Project it will…assume the data is in the Projects table.…This is configurable just like the primary key,…
Author
Released
1/28/2015- Accessing data with the active record and table data gateway patterns
- Creating objects with the factory, singleton, and mock objects patterns
- Extending code with decorator and adapter patterns
- Structuring applications with MVC and Action-Domain-Responder patterns
Each chapter features a design pattern in a real-world coding scenario, and closes with a practice challenge to test your new skills.
Skill Level Intermediate
Duration
Views
Related Courses
-
PHP: Creating Secure Websites (2014)
with Kevin Skoglund4h 15m Intermediate -
PHP: Accessing Databases with PDO and MySQLi
with David Powers3h 47m Intermediate
-
Introduction
-
Welcome51s
-
-
1. The Active Record Pattern
-
2. The Adapter Pattern
-
3. The Decorator Pattern
-
4. The Factory Pattern
-
5. Mock Objects
-
Introducing mock objects2m 18s
-
-
6. The Model-View-Controller Pattern
-
7. The Action-Domain-Response Pattern
-
8. The Publish/Subscriber Pattern
-
9. The Singleton Pattern
-
10. The Strategy Pattern
-
11. The Table Data Gateway Pattern
-
Conclusion
-
Next steps2m 8s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: The active record pattern in action