Skip to content

Commit 32840aa

Browse files
committed
model exists
1 parent 3873004 commit 32840aa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ <h6>More</h6>
692692
Model::findOrFail(array('first', 'last'));
693693
Model::where('foo', '=', 'bar')->get();
694694
Model::where('foo', '=', 'bar')->first();
695+
Model::where('foo', '=', 'bar')->exists();
695696
// dynamic
696697
Model::whereFoo('bar')->first();
697698
// Throw an exception if the lookup fails

index_zh-CN.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ <h6>More</h6>
692692
Model::findOrFail(array('first', 'last'));
693693
Model::where('foo', '=', 'bar')->get();
694694
Model::where('foo', '=', 'bar')->first();
695+
Model::where('foo', '=', 'bar')->exists();
695696
// 动态属性查找
696697
Model::whereFoo('bar')->first();
697698
// 查找失败时抛出异常

0 commit comments

Comments
 (0)