Missing piece

Add call to getAllFoos() for clarity
This commit is contained in:
Quim Calpe
2015-04-03 18:45:56 +02:00
parent 0c936fc943
commit 1d509e736f

View File

@@ -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';