Skip to content

Commit d7b3b04

Browse files
committed
show foreach in docs
1 parent 2d4f36b commit d7b3b04

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ $post = Post::find_by_name_and_id('The Bridge Builder',100);
102102
$post = Post::find_by_name_or_id('The Bridge Builder',100);
103103

104104
# find with conditions
105-
$posts = Post::all()->where('name=? or id > ?','The Bridge Builder',100);
105+
foreach(Post::all()->where('name=? or id > ?','The Bridge Builder',100) as $post) {
106+
echo $post->name;
107+
};
106108
```
107109

108110
### Create ###

0 commit comments

Comments
 (0)