Fix case of stdClass

This commit is contained in:
Sergey Pankov 2018-10-18 11:23:33 +03:00
parent 6307b4dac7
commit c4e155eebb
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ To run a basic query, you may use the `select` method on the `DB` facade:
The first argument passed to the `select` method is the raw SQL query, while the second argument is any parameter bindings that need to be bound to the query. Typically, these are the values of the `where` clause constraints. Parameter binding provides protection against SQL injection.
The `select` method will always return an `array` of results. Each result within the array will be a PHP `StdClass` object, allowing you to access the values of the results:
The `select` method will always return an `array` of results. Each result within the array will be a PHP `stdClass` object, allowing you to access the values of the results:
foreach ($users as $user) {
echo $user->name;

View File

@ -57,7 +57,7 @@ You may use the `table` method on the `DB` facade to begin a query. The `table`
}
}
The `get` method returns an `Illuminate\Support\Collection` containing the results where each result is an instance of the PHP `StdClass` object. You may access each column's value by accessing the column as a property of the object:
The `get` method returns an `Illuminate\Support\Collection` containing the results where each result is an instance of the PHP `stdClass` object. You may access each column's value by accessing the column as a property of the object:
foreach ($users as $user) {
echo $user->name;
@ -65,7 +65,7 @@ The `get` method returns an `Illuminate\Support\Collection` containing the resul
#### Retrieving A Single Row / Column From A Table
If you just need to retrieve a single row from the database table, you may use the `first` method. This method will return a single `StdClass` object:
If you just need to retrieve a single row from the database table, you may use the `first` method. This method will return a single `stdClass` object:
$user = DB::table('users')->where('name', 'John')->first();