Access all articles in sprocket icon.
Published February 6, 2017 by Bill Keck.
Laravel 5.4 For Beginners Bonus Chapters Released
Chapters 13 and 14 have been added to the Laravel 5.4 for Beginners book. The book is now 745 pages in length.
Anyone who has purchased the book can download the updated version for free, by logging into their Leanpub.com account. All updates are free for the life of the book.
In chapter 13, we cover sending mail and events. We work up an email that we send to registered users, when they complete registration. We also explore the different composition tools for creating mail, including the new markdown features, which really help us make a pretty email, with almost no effort.
We also cover events and listeners, and to demonstrate, we convert our simple mail message to an event, using artisan’s event:generate command. Eventing is a powerful design pattern and we cover it a way that is easy to grasp for beginners.
Finally in Chapter 13, we talk a little about Laravel’s amazing architecture. As I was going through some of the material, I found the following comment from Taylor Otwell, the creator of Laravel, in public/index.php:
We need to illuminate PHP development, so let us turn on the lights. — Taylor Otwell
I liked that quote so much, I made it the dedication to the book.
We learn just how well thought out the architecture is when we start looking at the service container, service providers, and automatic injection.
In chapter 14, we build a working chatroom, using Laravel Echo, Vue.js, and Pusher. It’s not super fancy, but it does have realtime updates, changing the room count when people enter and leave, and of course updating all messages for all users in realtime.
This chapter introduces us to Laravel Echo and Pusher, which we have not used previously, but also gives us the opportunity to work with nested Vue components.
In chapter 14, we also build a console command that deletes database records, so our chat application doesn’t overwhelm our DB with too many records. We need to maintain it, so we learn how to schedule the command twice a day, so a cron can run them.
For those who follow my work, these are additions that were not covered in previous versions of the book. Every time there is a new release of Laravel, I have to rewrite the book because of the many small changes that happen. It’s a lot of work. And sometimes there is a big change, like the move to Laravel Mix and dropping Elixir.
I strive to make the new versions of the book appealing to both readers who are just starting with Laravel and for those who have read the previous versions.
Thanks again to everyone who has supported my work, I really appreciate it. I look forward to continuing the learning journey with you.