Skip to content

Commit fd0c6c9

Browse files
committed
JT review
1 parent e654072 commit fd0c6c9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/fundamentals/database-collection.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,17 @@ schema builder method in your application.
247247
You can also use the following methods to return more information about the
248248
collection fields:
249249

250-
- ``Schema::hasColumn(string $<field name>)``: checks if the specified field exists
250+
- ``Schema::hasColumn(string $<collection>, string $<field name>)``: checks if the specified field exists
251251
in at least one document
252-
- ``Schema::hasColumns(string[] $<field names>)``: checks if each specified field exists
252+
- ``Schema::hasColumns(string $<collection>, string[] $<field names>)``: checks if each specified field exists
253253
in at least one document
254254

255+
.. note::
256+
257+
MongoDB is a schemaless database, so the preceding functions query the specified
258+
collection rather than the database schema. If the collection doesn't exist
259+
or is empty, these functions return a value of ``false``.
260+
255261
Example
256262
```````
257263

0 commit comments

Comments
 (0)