@@ -161,8 +161,8 @@ as in the preceding example, but the query is constructed by using the
161
161
List Collections
162
162
----------------
163
163
164
- This section describes how to see information about each collection in a database
165
- in the following ways :
164
+ You can take either of the following actions to see information
165
+ about the collections in a database :
166
166
167
167
- :ref:`laravel-list-coll-command`
168
168
- :ref:`laravel-list-coll-methods`
@@ -172,16 +172,17 @@ in the following ways:
172
172
Run a Shell Command
173
173
~~~~~~~~~~~~~~~~~~~
174
174
175
- You can list the collections in a database by running the following shell
176
- command from your project root:
175
+ You can list the collections in a database by running the following
176
+ command in your shell from your project's root directory :
177
177
178
178
.. code-block:: bash
179
179
180
180
php artisan db:show
181
181
182
182
This command outputs information about the configured database and lists its
183
183
collections under the ``Table`` header. For more information about the ``db:show``
184
- command, see `Laravel: New DB Commands <https://blog.laravel.com/laravel-new-db-commands-and-more>`__.
184
+ command, see `Laravel: New DB Commands <https://blog.laravel.com/laravel-new-db-commands-and-more>`__
185
+ on the official Laravel blog.
185
186
186
187
.. _laravel-list-coll-methods:
187
188
@@ -212,8 +213,8 @@ the collections in the database:
212
213
List Collection Fields
213
214
----------------------
214
215
215
- This section describes how to see information about each field in a collection
216
- in the following ways :
216
+ You can take either of the following actions to see information
217
+ about each field in a collection :
217
218
218
219
- :ref:`laravel-list-fields-command`
219
220
- :ref:`laravel-list-fields-methods`
@@ -223,16 +224,17 @@ in the following ways:
223
224
Run a Shell Command
224
225
~~~~~~~~~~~~~~~~~~~
225
226
226
- You can see a list of fields in a collection by running the following shell
227
- command from your project root:
227
+ You can see a list of fields in a collection by running the following
228
+ command in your shell from your project's root directory :
228
229
229
230
.. code-block:: bash
230
231
231
232
php artisan db:table <collection name>
232
233
233
234
This command outputs each collection field and its corresponding data type
234
235
under the ``Column`` header. For more information about the ``db:table``
235
- command, see `Laravel: New DB Commands <https://blog.laravel.com/laravel-new-db-commands-and-more>`__.
236
+ command, see `Laravel: New DB Commands <https://blog.laravel.com/laravel-new-db-commands-and-more>`__
237
+ on the official Laravel blog.
236
238
237
239
.. _laravel-list-fields-methods:
238
240
@@ -242,12 +244,12 @@ Call Schema Methods
242
244
You can list the fields in a collection by calling the ``Schema::getColumns()``
243
245
schema builder method in your application.
244
246
245
- You can also call the following methods to return more information about the
247
+ You can also use the following methods to return more information about the
246
248
collection fields:
247
249
248
- - ``Schema::hasColumn(string $field)``: checks if the specified field exists
250
+ - ``Schema::hasColumn(string $< field name> )``: checks if the specified field exists
249
251
in at least one document
250
- - ``Schema::hasColumns(string[] $fields )``: checks if each specified field exists
252
+ - ``Schema::hasColumns(string[] $<field names> )``: checks if each specified field exists
251
253
in at least one document
252
254
253
255
Example
0 commit comments