mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-05 05:27:28 +02:00
Missing piece
Add call to getAllFoos() for clarity
This commit is contained in:
@@ -54,7 +54,9 @@ $db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8', 'username', 'pa
|
||||
include 'models/FooModel.php';
|
||||
|
||||
// Create an instance
|
||||
$fooList = new FooModel($db);
|
||||
$fooModel = new FooModel($db);
|
||||
// Get the list of Foos
|
||||
$fooList = $fooModel->getAllFoos();
|
||||
|
||||
// Show the view
|
||||
include 'views/foo-list.php';
|
||||
|
Reference in New Issue
Block a user