When a Model only contains data from a database entry, how should one retrieve all entries from a specific table in PHP MVC - through a Controller or Model?

When a Model only contains data from a database entry, it is best practice to retrieve all entries from a specific table in PHP MVC through the Model. The Model should handle interactions with the database, including fetching data. This separation of concerns ensures a clean and organized structure in the MVC architecture.

// Model
class EntryModel {
    public function getAllEntries() {
        // Database query to retrieve all entries from a specific table
        return $entries;
    }
}

// Controller
class EntryController {
    public function index() {
        $entryModel = new EntryModel();
        $entries = $entryModel->getAllEntries();
        
        // Pass data to the view
        require('view.php');
    }
}