Is there a way to exclude items in a collection that are saved as drafts when using the Entry API? How would I modify the code below to only show projects that are published?

$projects = Entry::whereCollection('project');
Answered by Erin Dalzell! Go to answer.