Laracasts mascots - robot, elephant, monster, computer.

This episode is for
subscribers only.

For the cost of a pizza, you'll gain access to this and hundreds of hours worth of content from top developers in the Laravel space!

1

A Thread Can Be Pinned

Episode
16
Published
Jan 31st, 2018
Run Time
13m 51s
Topic
Git
JeffreyWay's avatar
Your Instructor
automica's avatar
automica
5 years ago

the issue which Jeffrey came across at 11:20

$threads[$ids[2]]

was because he was after the 3rd thread, with index 2.

$thread[2] at this point has the same id as $ids[2].

As its the 3rd thread, it would have id = 3;

This would make $threads[$ids[2]] equivalent to $threads[3], but as we don't have $threads[3] (index starts at 0) then it fails with illegal offset error.

Your avatar

You get a window into a seasoned developer's mind and workflow for the price of an Uber. I can't overstate the value of a Laracasts subscription.

Caleb Porzio — Creator of Livewire

Subscribe to unlock full access.