Errata

Laravel: Up and Running

Errata for Laravel: Up and Running

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
PDF, ePub, Mobi
Page PDF pg 242
Top, just before example 10-19

In the phrase "except we have to give one a key", I believe the word "one" should be "each" or "it", to improve clarity of meaning and readability.
Or maybe change "give one a key" to "include a key".

Sentence is:
"It’s similar to adding them to $middleware, except we have to give one a key that will be used when applying this middleware to a particular route, as seen in Example 10-19."

Note from the Author or Editor:
"except we have to give one a key" should be "except we have to give each a key"

Chris Brown  Dec 11, 2016  Feb 03, 2017
ePub
Page ??
Example 13-4

The example shows routes to be added to a Routes.php file, however in the Laravel version that the book is aimed at (5.3) routes is a directory containing four files and the Routes.php file does not exist! This prevents the example from working and is confusing!

Note from the Author or Editor:
In chapter 13, "Binding the routes for a resource controller" example, this comment:

// Routes.php

should instead be this:

// routes/web.php

Barnaby Norman  Oct 09, 2017  Apr 27, 2018
ePub
Page ePub

In the quick steps to full authentication system it should be noted that "php artisan migrate" won't work on a fresh system unless the database settings have been configured first.

Note from the Author or Editor:
In chapter 09, after the words "Let's review quickly the steps from new site to full authentication system, there's this chunk of code:

----
laravel new MyApp
cd MyApp
php artisan make:auth
php artisan migrate
----

Let's replace it with this version, containing a comment:

----
laravel new MyApp
cd MyApp
php artisan make:auth
# If necessary, update .env for the correct database settings
php artisan migrate
----

Barnaby Norman  Oct 15, 2017  Apr 27, 2018
ePub
Page ?
Why Laravel > A short history > The Influx > 1st paragraph

Should end in "started popping up quickly," rather than "starting popping up quickly."

Greg Kaleka  Sep 12, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 1st Edition PDF pg 264
1st paragraph

Sentence in question:
"Since this was an application test, the stack trace just shows us that it was called via the InteractsWithPages trait, but if this were a unit or application test, we’d see the entire call stack of the test."

The word "application test" is used twice here, but confusingly.
ie: "since this was an application test .... but if this were a ... application test...".

Note from the Author or Editor:
"but if this were a unit or application test, we’d see the entire call stack of the test."

should be

"but if this were a unit or integration test, we’d see the entire call stack of the test."

Chris Brown  Dec 11, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 1st Edition PDF pg 270
In description for $this->seeInField()

"text area" should be "textarea", as it's referring to HTML input field types.

Chris Brown  Dec 11, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 1st Edition PDF pg 320
Middle of page, first paragraph under Accessing The Session

The paragraph is instructing how to use the Session facade, but then the example given is actually the global helper, and not the facade. (The global helper is correctly given a couple paragraphs later.)

Paragraph in question:
"The most common way to access the session is using the Session facade:
session()->get('user_id');
But you can also use the session() method on any given Illuminate Request object ..."

Note from the Author or Editor:
The location of the Session facade description and the global session() helper should be switched. Currently the order of definitions in this "Accessing the Session" section is:

1. Facade (with incorrect sample)
2. Request object
3. Inject instance of Illuminate\Session\Store
4. Global helper
5. "If you're new to Laravel, [...]"

The order should instead be:

1. Global helper
2. Request object
3. Inject instance of Illuminate\Session\Store
4. Facade
5. "If you're new to Laravel, [...]"

---------------------------------------------------

In order to do that, we need to replace this:

"The most common way to access the session is using the Session facade:

session()->get('user_id');"

With this:

"The most common way to access the session is using the global session() helper. Use it with no parameters to get a session instance, with a single string parameter to “get” from the session, or with an array to “put” to the session, as demonstrated in Example 14-7.

Example 14-7. Using the global session() helper
// get
$value = session()->get('key');
$value = session('key');
// put
session()->put('key', 'value'); session(['key', 'value']);
"

(I assume that this will become example 14-5 instead of 14-7, and then the current 14-5 and 14-6 will each bump up one number to 14-6 and 14-7.)

Then we need to replace the old "Finally, you can use the global session() helper" paragraph and its following Example 14-7 with this:

"Finally, you can use the Session facade:

Session::get('user_id');"

Chris Brown  Dec 11, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 1st Edition PDF pg 349
Middle of page, in section "Sending notifications with the Notification facade"

The sentence says "you can pass more than one ... like you can see in the example" ... but then the example shows only one, not more than one.

Quote:
"However, it’s helpful because you can choose to pass more than one notifiable in at the same time, like you can see in Example 15-15.
Example 15-15. Sending notifications using the Notification facade
use App\Notifications\WorkoutAvailable;
...
Notification::send($users, new WorkoutAvailable($workout));
"

Note from the Author or Editor:
It's actually correct as-is, but it's not entirely clear. Let's change the last line of Example 15-15 from this:

Notification::send($users, new WorkoutAvailable($workout));

to this:

Notification::send(User::all(), new WorkoutAvailable($workout));

Chris Brown  Dec 11, 2016  Feb 03, 2017
Printed, PDF, ePub, Mobi, , Other Digital Version
Page 13.2
Controller Organization and JSON Returns, example 13.4

In the Writing APIs chapter and Controller Organization and JSON Returns section. In Example 13-4. Binding the routes for a resource controller. There is a minor code error where the routing group attribute does not have a closing square bracket till the end of the function call.

// Routes.php

Route::group(['prefix' => 'api', 'namespace' => 'Api', function () {
Route::resource('dogs', 'DogsController');
}]);

Where it should be:

Route::group(['prefix' => 'api', 'namespace' => 'Api'], function () {
Route::resource('dogs', 'DogsController');
});

Note from the Author or Editor:
In example 13.4, this code:

Route::group(['prefix' => 'api', 'namespace' => 'Api', function () {
Route::resource('dogs', 'DogsController');
}]);

Should look like this:

Route::group(['prefix' => 'api', 'namespace' => 'Api'], function () {
Route::resource('dogs', 'DogsController');
});

Will Stumpf  Dec 09, 2016  Feb 03, 2017
Printed
Page 18
"The Folders" section

The description of the app folder states that it contains route definitions:

"Models, controllers, route definitions, commands, and your PHP domain code all go in here."

However, route definitions are actually contained in the routes folder, as stated in the subsequent bullet for the routes folder:

"routes is where all of the route definitions live..."

Note from the Author or Editor:
This is correct; this section of the book was written before we extracted routes.
"Models, controllers, route definitions, commands, and your PHP domain code all go in here."
Should say
"Models, controllers, middleware, commands, and your PHP domain code all go in here."

Bryan Fisher  Mar 14, 2017  Apr 27, 2018
PDF
Page 21
Copy in Lambo section

I perform the this set of steps so often that I created a simple global Composer package to do it for me. It’s called Lambo, and you can learn more about it on GitHub.

Note from the Author or Editor:
"I perform the this" should be "I perform this"

Anonymous  Nov 25, 2016  Feb 03, 2017
PDF
Page 27
Callout box "The Naming Relationship...", in the code block

In the code block in the "The Naming Relationship..." box describing Example 3-5, the "$thisIsActuallyTheRouteId" variable should be named instead "$thisIsActuallyTheUserId"

Matt Stauffer
Matt Stauffer
 
Dec 14, 2016  Feb 03, 2017
PDF, ePub
Page 29
Chapter 3, before example 3-2

"...you can can serve a classic website easily." should be "...you can serve a classic website easily.".

Note from the Author or Editor:
"can can serve a classic" should be "can serve a classic"

José Miguel Bailo Melo  Dec 02, 2016  Feb 03, 2017
Printed, PDF, ePub
Page 35
TLDs for development sites

It says:
"You can choose any convention for local development sites’ URLs, but .app and .dev are the most common. Throughout this book, I’ll be using .app—so if I’m working on a local copy of symposiumapp.com, I’ll develop at symposiumapp.app."

".app" is a valid TLD, operated by Google[1][2], as is ".dev" [3]

Using it locally may lead to problems, as soon as it goes live.
If you forget to enter it in your HOSTS file, your OS will ask the DNS Servers for the adress and may get a valid response. And you may also overwrite a valid site with your local HOSTS entry.

Best practice is to avoid using valid TLDs [4]. IANA has reserved TLDs for those purposes: .example, .test [5]

[1] https://www.iana.org/domains/root/db/app.html
[2] https://www.registry.google
[3] https://www.iana.org/domains/root/db/dev.html
[4] https://iyware.com/dont-use-dev-for-development/
[5] http://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml#special-use-domain

Note from the Author or Editor:
add a note:

Technically, .app and .dev are valid TLDs, so by choosing them for your own internal use, you could be conflicting with real domains. This doesn’t really bother me, but if you’re concerned, there are four TLDs reserved for development purposes: .example, .test, .invalid, and .localhost.

Anonymous  Aug 23, 2016  Feb 03, 2017
Printed
Page 43
Title of Example 3-28

Title of Example 3-28 is:

Using an explicit route model binding

I believe it should be:

Using an implicit route model binding

Note from the Author or Editor:
The title for example 3-28 should be changed from this:

"Using an explicit route model binding"

to this:

"Using an implicit route model binding"

Bryan Fisher  Mar 14, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 47
Example 3-33

Vue no longer uses Vue-Resource; instead, they use Axios. So the second example, which says "in Vue" should change from this:

// in Vue:
Vue.http.interceptors.push((request, next) => {
request.headers['X-CSRF-TOKEN'] =
document.querySelector('#token').getAttribute('content');
next();
});

to this:

// with axios:
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = document.querySelector('#token').getAttribute('content');


Then, two paragraphs later, the note says:

Note that the Vue syntax for CSRF in this example is not necessary if you’re working with the 5.3 Vue bootstrap; it already does this work for you.

We should replace this with:

Note that the Axios syntax for CSRF in this example is not necessary if you are using the auth and Vue bootstraps that come with Laravel 5.3 and later.

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 50
First paragraph, under "redirect()->back()"

This sentence:

That opens up the opportunity for a redirect()->() redirect, which simply redirects the user to whatever page she came from.

Should say this:

That opens up the opportunity for a redirect()->back() redirect, which simply redirects the user to whatever page she came from.

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 52
Example 3-40

In the second line of Example 3-40, "Redirect with errors", there is an errant ).

This line:

$validator = Validator::make($request->all()), $this->validationRules);

should be this:

$validator = Validator::make($request->all(), $this->validationRules);

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 99
First paragraph of the "Facade Namespaces, the request() Global Helper, and Injecting $request" block

Illuminate\Support\facades\Request

should be

Illuminate\Support\Facades\Request

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 118
Code snippet in/below the 2nd paragraph

Right after "So, let's do it:" this line:

php artisan make:console WelcomeNewUsers --command=email:newusers

should be changed to this:

php artisan make:command WelcomeNewUsers --command=email:newusers

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
Printed
Page 124
Section titled "Prompts"

When detailing the methods available, under 'secret()' the example given uses 'ask()' instead of the given method.

Note from the Author or Editor:
Immediately beneath the secret() header, the code sample should show $password = $this->secret(...) instead of $password = $this->ask(...)

Josh Welford  Dec 05, 2016  Feb 03, 2017
ePub
Page 137
2nd paragraph

Content containing error:

"<!-- resources/views/layouts/master.blade.php -->
<html>
<head>
<title>My Site | @yield('title', 'Home Page')</title>
</head>
<body>
<div class="container">
@yield('content')
</div>
@section('footerScripts')
<script src="app.js"></script>
@show
</body>
</html>
This looks a bit like a normal HTML page, but you can see we've yielded in two places (title and content), and we've defined a section in a third (footerScripts).
We have three Blade directives here that each look a little different: @yield('title', 'Home Page') alone, @yield('content') with a defined default, and @section ... @show with actual content in it."

"We have three Blade directives here that each look a little different: @yield('title', 'Home Page') alone, @yield('content') with a defined default, and @section ... @show with actual content in it."

should be

"We have three Blade directives here that each look a little different: @yield('title', 'Home Page') with a defined default, @yield('content') alone, and @section ... @show with actual content in it."

Note from the Author or Editor:
This error is correct exactly as Logan described:

"We have three Blade directives here that each look a little different: @yield('title', 'Home Page') alone, @yield('content') with a defined default, and @section ... @show with actual content in it."

should be

"We have three Blade directives here that each look a little different: @yield('title', 'Home Page') with a defined default, @yield('content') alone, and @section ... @show with actual content in it."

Logan Henson  Apr 04, 2017  Apr 27, 2018
Printed
Page 145
1st parag

Example 8-7

should be

Example 8-5

Note from the Author or Editor:
In the section "Overriding properties when calling a model factory." in chapter 8, "like we did in Example 8-7 to set" should be "like we did in Example 8-5 to set".

troy porter  Jan 03, 2017  Feb 03, 2017
Printed
Page 147
Raw SQL section - first sentence

As we saw in Example 8-1...

should be

As we saw in Example 8-8...

Note from the Author or Editor:
In the "Raw SQL" section of chapter 8, "As we saw in Example 8-1, it’s possible" should be "As we saw in Example 8-8, it’s possible"

troy porter  Jan 03, 2017  Feb 03, 2017
Printed
Page 151 - 152
last paragraph

The PHP code example is duplicated:

$closeBy = DB::table('contacts') ...

The first one should be removed as its missing necessary quotes.

Note from the Author or Editor:
In the chapter 8 "Constraining methods" section, under the "whereIn(colName, [1, 2, 3])" section, the code sample is duplicated; the first version is wrong and should be deleted ("$closeBy = DB::table('contacts')- >whereIn(state, [FL, GA, AL])->get().") and the second version is right and should remain ("$closeBy = DB::table('contacts')->whereIn('state', ['FL', 'GA',
'AL'])->get()").

troy porter  Jan 03, 2017  Feb 03, 2017
ePub
Page 152
Code Example 3-43

iOS Mobile page 152 at Example 3-43, just before the TL;DR.

In the method `test_list_page_shows_all_assignments` it says `dee` instead of `see`.

Note from the Author or Editor:
In example 3-43, this line:

->dee(['My great assignment']);

should be this:

->see(['My great assignment']);

Anonymous  Dec 05, 2016  Feb 03, 2017
PDF
Page 158 in Nov 22 2016 edition of PDF
Example 8-11

$conatct->email = $request->input('email');

$conatct should be $contact

Note from the Author or Editor:
"$conatct" should be "$contact"

Chris Brown  Nov 29, 2016  Feb 03, 2017
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 168
Code block at the bottom of the page

There are three places in chapter 8, talking about Local scopes, where I define a class Contact. All three are missing a closing brace.

The first is right after "We can–it's called a local scope. And it's easy to define on the Contact class."

The last few lines of the example should change from this:

return $query->where('vip', true)->where('trial', false);
}

to this:

return $query->where('vip', true)->where('trial', false);
}
}

The same change should happen in the example on page 169, which comes after "You can also define scopes that accept parameters:"; these last lines:

return $query->where('status', $status);
}

should look like this:

return $query->where('status', $status);
}
}

Finally, example 8-22 has the same problem. These last lines:

$builder->where('active', true);
});
}

should look like this:

$builder->where('active', true);
});
}
}

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
ePub
Page 171
Page 171 First paragraph, first word

iOS Mobile page 171

It says `contentsx`, where it should be `contents`.

Note from the Author or Editor:
"Third, with @section('content') and on, we use the normal syntax to define the contentsx of the content section. "

In this paragraph, "contentsx" should be "contents"

Anonymous  Dec 05, 2016  Feb 03, 2017
Printed
Page 184
Paragraph below example 8-39

Paragraph describes that the conventional naming of the pivot table is done by placing the two singular names together, ordered alphabetically, and separating them by an underscore. But in the following paragraph, the pivot table name uses pluralized names: contacts_users.

Note from the Author or Editor:
In the paragraph starting with "So, since we're linking users and contacts", the database table name "contacts_users" should be "contact_user" instead (changing both from plural to singular)

Anonymous  Jun 07, 2017  Apr 27, 2018
PDF
Page 187
Example 8-43

Example 8-43 on page 187 and example 8-46 on page 188 contain typo in method name, correct is morphTo() instead of the current morphsTo(), the latter example is also missing parentheses in the method call. And in relation to that the index at the end of the book contains the same typo (at the bottom of page 423)

Note from the Author or Editor:
Every instance of the string "morphsTo" in the book should be replaced with the string "morphTo".

Additionally, the instance in example 8-43 should be this:

return $this->morphTo();

instead of this:

return $this->morphsTo;

This includes the index for the morphsTo method, which should instead be an index for the morphTo method

Kurt Moser  Feb 20, 2017  Apr 27, 2018
PDF
Page 187
Bottom of the page, between examples 8-43 and 8-44

In 'So, how do we create a Star?' example the method call $contact->stars()->create() is missing an argument. https://github.com/illuminate/database/blob/master/Eloquent/Relations/MorphOneOrMany.php line 161 shows create() expecting an array as an argument. $contact->stars()->create([]) is enough to fix this issue.

Note from the Author or Editor:
In the technical example in chapter 8 after example 8-43, right after these words:

So, how do we create a +Star+?

Replace this line:

$contact->stars()->create();

with this:

$contact->stars()->create([]);

Kurt Moser  Feb 20, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 188
Last paragraph

Just for the sake of readability:

That’s it! You can now run $star->user or $user->stars to find a list of a User’s Stars or to find the starring User from a Star.

Should be:

That’s it! You can now run $user->stars or $star->user to find a list of a User’s Stars or to find the starring User from a Star.

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
PDF
Page 200 in Nov 22 2016 edition of PDF
2nd paragraph

"verison" should be "version" in:

... traits in the Illuminate\Foundation \Auth verison of User that ...

Note from the Author or Editor:
"verison" should be "version"

Chris Brown  Nov 29, 2016  Feb 03, 2017
PDF
Page 205
Example 9-5. The routes provided by Auth::routes(), first block

$this->get('logout', ...

should be

$this->post('logout', ...

Matt Stauffer
Matt Stauffer
 
Jan 04, 2017  Feb 03, 2017
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 215
Example 9-14

The text of the second half of example 9-14, and the paragraph following it, are a bit confusing. Change this:


Example 9-14. Using the Authorize middleware

Route::get('people/create', function () {
// Create person...
})->middleware('can:create-person');

Route::get('people/{person}/edit', function () {
// Create person...
})->middleware('can:create,person');

Here, the {person} parameter (whether it’s defined as a string or as a bound route model) will be passed to the ability method as an additional parameter.


to this:


Example 9-14. Using the Authorize middleware

Route::get('people/create', function () {
// Create person...
})->middleware('can:create-person');

Route::get('people/{person}/edit', function () {
// Edit person...
})->middleware('can:edit-person,person');

In the second example, the {person} URL parameter (whether it’s defined as a string or as a bound route model) will be passed to the ability method as an additional parameter.

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
Printed
Page 216
Example 9-16

There are two mistakes with the authorization-to-methods:

Frist:

$this->authorizeResource(Contact:class); would not cover index()!

Laravel only maps the following method names to policy methods:
'show' => 'view',
'create' => 'create',
'store' => 'create',
'edit' => 'update',
'update' => 'update',
'destroy' => 'delete',

Second:

public function index()
{
$this->authorize('view', Contact:class);
}

This would not work because the view-policy required two parameters User and Contact. Thought Contact::class the second
is missing.

Note from the Author or Editor:
In example 9-16, in the ContactsController PHP class, we should delete the entire index() method, meaning the methods will begin with __construct and move directly to create

...
class ContactsController extends Controller
{
public function __construct() { .. }

public function create() { ... }
...

Anonymous  Aug 05, 2017  Apr 27, 2018
ePub
Page 239
Page 239 Code Example 5-19

iOS Mobile page 239 at Example 5-19.

It says `dashbaord` where it should be `dashboard`. Small typo.

Note from the Author or Editor:
This line:

'back' => 'Back to :section dashbaord'

Should look like this:

'back' => 'Back to :section dashboard'

Anonymous  Dec 05, 2016  Feb 03, 2017
Printed
Page 242
Example 10-20, second code block

Array bracket in the Route::group call should end before the closure, not after it.

This code:
// Makes more sense for our current example...
Route::group(['prefix' => 'api', 'middleware' => 'nodelete', function () {
// All routes related to an API
}]);

Should look like this:
// Makes more sense for our current example...
Route::group(['prefix' => 'api', 'middleware' => 'nodelete'], function () {
// All routes related to an API
});

Matt Stauffer
Matt Stauffer
 
Dec 13, 2016  Feb 03, 2017
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 257
Example 11-11

In the 5th line of Example 11-11, Facade should be capitalized.

This line:

class Log extends facade

should read as this:

class Log extends Facade

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
Printed
Page 279
Last line of page

Missing ">" just before "shouldIgnoreMissing();"

Note from the Author or Editor:
In the last code sample on page 279, just below the words "we can just use shouldIgnoreMissing():", the code sample should be:

$slackMock = Mockery::mock(SlackClient::class)->shouldIgnoreMissing();

instead of

$slackMock = Mockery::mock(SlackClient::class)-shouldIgnoreMissing();

Anonymous  Jun 15, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 310
Example 13-26

In example 13-26, it's confusing to have a "get" route that checks for "add" and "delete" abilities. The tokenCan should be for the "list-clips" scope to help it be more clear.

This line:

if (auth()->user()->tokenCan('add-delete-clips')) {

should say this:

if (auth()->user()->tokenCan('list-clips')) {

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 311
Example 13-27

Missing semicolon after the second example.

Route::get('clips', function () {
// Access token has at least one of the listed scopes
})->middleware('scope:list-clips,add-delete-clips')


should be:

Route::get('clips', function () {
// Access token has at least one of the listed scopes
})->middleware('scope:list-clips,add-delete-clips');

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 356
"Simple beanstalkd queues on Laravel Forge" box

this phrase:

but it's a hosting service provided by Taylor Otwell

should be

but it's a server provisioning service provided by Taylor Otwell

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 360
Just above "Handling Errors" subhead

The way queue workers are called has changed in Laravel 5.3. This line:

You can also process just a single job with php artisan queue:work.

Should instead read as this:

In versions of Laravel prior to 5.3, the command to run a queue listener was php artisan queue:listen.

This sentence should also have a little "5.2" marker on it.. or whichever marker is the one that indicates "this content applies to versions of Laravel before 5.3"... I can never remember which.

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 380
First paragraph

This phrase:

"And now we now have access"

should be:

"And now we have access"

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
PDF, ePub, Mobi
Page 394 of 1st Edition PDF
2 code snippets at bottom of the page

This is the section on the route() helper, but these 2 code samples use the action() helper from the previous section.

Instead of action('people.show', [params]), both should be route('people.show', [params])

Note from the Author or Editor:
In the code snippet under the route($routeName, ...) header, these lines:

<a href="{{ action('people.show', ['id' => 3]) }}">See Person #3</a>
// or
<a href="{{ action('people.show', [3]) }}">See Person #3</a>

should be:

<a href="{{ route('people.show', ['id' => 3]) }}">See Person #3</a>
// or
<a href="{{ route('people.show', [3]) }}">See Person #3</a>

Chris Brown  Dec 13, 2016  Feb 03, 2017
, Printed, PDF, ePub, Mobi, , Other Digital Version
Page 394
Multiple times on the page

Each call to the action('PeopleController on this page is missing its closing paren.

This:

<a href="{{ action('PeopleController@index' }}">See all People</a>

Should be this:

<a href="{{ action('PeopleController@index') }}">See all People</a>

And this:

<a href="{{ action('PeopleController@show', ['id' => 3] }}">See Person #3</a> // or
<a href="{{ action('PeopleController@show', [3] }}">See Person #3</a>

Should be this:

<a href="{{ action('PeopleController@show', ['id' => 3]) }}">See Person #3</a> // or
<a href="{{ action('PeopleController@show', [3]) }}">See Person #3</a>

Matt Stauffer
Matt Stauffer
 
May 02, 2017  Apr 27, 2018
PDF, ePub, Mobi
Page 398 of 1st Edition PDF
middle of page, "response()" section

The phrase "no response" should be "no parameters" in second sentence of paragraph:

"If passed with parameters, returns a prebuilt instance of Response. If passed with no response, returns an instance of the Response factory:"

Note from the Author or Editor:
Under the response($body, ...) header on page 398, "If passed with no response" should be "If passed with no parameters"

Chris Brown  Dec 13, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 398 of 1st Edition PDF
Bottom

I would have loved the reference to Adam Wathan's book to be a hotlink or at least a footnote.

Note from the Author or Editor:
You can find the book site at https://adamwathan.me/refactoring-to-collections/

Chris Brown  Dec 13, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 399 of 1st Edition PDF
Sentence after example 17-2

(+$admins+) should be just ($admins)

Note from the Author or Editor:
On page 399, the parenthetical in the first sentence after example 17-2 should be ($admins) with code style, not (+$admins+)

Chris Brown  Dec 13, 2016  Feb 03, 2017
PDF, ePub, Mobi
Page 404 of 1st Edition PDF
40% down

There are 3 code samples for the sort(), sortBy(), sortByDesc(). The first is fine.

The 2nd and 3rd samples are demonstrating sort() but the paragraph before them says they are supposed to be examples of sortBy or sortByDesc:

so, it's just a minor inconsistency:

"If they’re more complex, you can pass a string (representing the property) or a closure to sortBy() or sortByDesc() to define your sorting behavior:

// Sort an array of users by their 'email' property
$users->sort('email');
// Sort an array of users by their 'email' property
$users->sort(function ($user, $key) { return $user['email'];
});
"

Note from the Author or Editor:
In the sort(), sortBy(), and sortByDesc() section on page 404, the following code:

// Sort an array of users by their 'email' property
$users->sort('email');

// Sort an array of users by their 'email' property
$users->sort(function ($user, $key) {
return $user['email'];
});

Should instead be:

// Sort an array of users by their 'email' property
$users->sortBy('email');

// Sort an array of users by their 'email' property
$users->sortBy(function ($user, $key) {
return $user['email'];
});

Chris Brown  Dec 13, 2016  Feb 03, 2017