Table of Contents

The beta book is broken into 15 chapters, each of which is briefly described below. Remember, the book is currently in beta, which is why not all of these chapters are included in your download! Many are under development and almost complete, so in the coming weeks I'll be regularly pushing up new versions and notifying readers.

Each chapter description includes a note describing the state of each chapter for both the current and beta edition.

Chapter 1. Introducing Laravel

Current Edition: 100% complete but a bit outdated
Beta Edition: 100% complete and current for 5.5

In this opening chapter you'll learn how to create and configure your Laravel project using your existing PHP development environment, a virtual machine known as Laravel Homestead, and a minimal development environment known as Valet (OSX users only). I'll also show you how to configure your environment in order to effectively debug your Laravel applications, and how to extend Laravel's capabilities by installing several popular third-party packages. We'll conclude the chapter with an introduction to PHPUnit, showing you how to create and execute your first automated Laravel test!

Chapter 2. Managing Your Project Controllers, Layout, Views, and Other Assets

Current Edition: 100% complete but a bit outdated
Beta Edition: 95% complete and current for 5.5

In this chapter you'll learn how to create controllers and actions, and define the routes used to access your application endpoints. You'll also learn how to create the pages (views), work with variable data and logic using the Blade templating engine, and reduce redundancy using layouts and view helpers. I'll also introduce Laravel Elixir, a new feature for automating otherwise laborious tasks such as JavaScript transpiling and CSS minification. You'll also learn how to integrate several popular CSS frameworks, including Bootstrap 3 and 4, and Tailwind, and how to use Laravel Dusk for integration testing.

Chapter 3. Talking to the Database

Current Edition: 100% complete but a bit outdated
Beta Edition: 100% complete and current for 5.5

In this chapter we'll turn our attention to the project's data. You'll learn how to integrate and configure the database, manage your database schema using migrations, and easily populate your database using seeds. From there we'll move on to creating models, and how to query the database through these models using the Eloquent object relational mapper. I'll also introduce the concept of resourceful controllers, and we'll generate a controller which will be used to view and manage the example project's events. You'll also learn how how to use Laravel's Query Builder to query the database when Eloquent isn't possible or practical.

Chapter 4. Customizing Your Models

Current Edition: Material found in other chapters
Beta Edition: 100% complete and current for 5.5

Laravel models are incredibly powerful tools, and can be customized in a variety of ways to meet your project's specific needs. In this chapter you'll learn how to override model defaults to create custom accessors and mutators, add instance methods, and use scopes to easily filter database results with minimal code redundancy. You'll also learn how to create sluggable URLs using the eloquent-sluggable package. The chapter concludes with an introduction to testing your models using Laravel's amazing database-specific test features.

Chapter 5. Creating, Updating, and Deleting Data

Current Edition: Material found in other chapters
Beta Edition: 100% complete and current for 5.5

The last two chapters were primarily focused upon the many different ways you can query the database. In this chapter we'll turn our attention to creating, updating, and deleting data. In addition to a review of the Eloquent syntax used to perform these tasks, we'll continue building out the resourceful controller created in chapter 3. You'll also learn how to incorporate flash notifications into your controllers and views to keep users updated regarding request outcomes, and how to use Laravel Dusk to test your forms.

Chapter 6. Validating User Input

Current Edition: Material found in other chapters
Beta Edition: 95% complete and current for 5.5

For reasons of simplicity, the last chapter focused exclusively on what it must be like to leave in a world in which error prone or malicious users didn't exist. That is to say I momentarily punted on the matter of user input validation. But data validation is so crucial to successful web application development that it can be put off no longer, and so this chapter is devoted entirely to the topic. In this chapter you'll learn all about Laravel's native validators, and how to incorporate form requests into your project to add form validation while ensuring your controller code remains lean.

Chapter 7. Creating and Managing Model Relationships

Current Edition: see Chapter 4. Material very current.
Beta Edition: 95% complete and current for 5.5.

Building and navigating table relations is an standard part of the development process even when working on the most unambitious of projects, yet this task is often painful when working with many web frameworks. Fortunately, using Laravel it's easy to define and traverse these relations. In this chapter I'll show you how to define, manage, and interact with one-to-one, one-to-many, many-to-many, has many through, and polymorphic relations.

Chapter 8. Sending E-mails

Current Edition: see Chapter 5. Material a bit outdated, but relevant and useful.
Beta Edition: 99% complete and current for 5.5.

Whether for requiring newly registered users to confirm their e-mail address, or notifying event attendees of scheduling changes, web applications such as HackerPair rely heavily on using e-mail as an efficient means of communication. In this chapter you'll learn about Laravel's `Mailable` class, a fantastic solution for generating e-mails within your application. You'll also learn how to test e-mail generation and delivery in a sane fashion. Just for added measure, I'll walk you through the steps I took to incorporate a contact form into HackerPair which when submitted sends inquiring users' messages and contact details to a support address.

Chapter 9. Authenticating and Managing Your Users

Current Edition: see Chapter 7. Material a bit outdated, but relevant and useful.
Beta Edition: 100% complete and current for Laravel 5.5

Most modern applications offer user registration and preference management features in order to provide customized, persisted content and settings. In this chapter you'll learn how to integrate user registration, login, and account management capabilities into your Laravel application. I'll also show you to to add social authentication to your application, allowing users to authenticate using a variety of popular OAuth providers such as Twitter, Facebook, and GitHub.

Chapter 10. Creating an Administration Console

Current Edition: see Chapter 8. Material a bit outdated, but relevant and useful.
Beta Edition: Not yet released.

Most web applications incorporate a restricted administration console accessible by the project developers and support team. In this chapter I'll show you an easy solution for designating certain users as administrators, and how to grant access to a restricted console using prefixed route grouping and custom middleware.

Chapter 11. Introducing Events

Current Edition: see Chapter 11. Material a bit outdated, but relevant and useful.
Beta Edition: Not yet released.

This chapter introduces Laravel Events, showing you how to create event handlers, event listeners, and integrate events into your application logic. You'll also learn all about Laravel's fascinating event broadcasting capabilities, accompanied by several real-world examples.

Chapter 12. Introducing Vue.js

Current Edition: No applicable chapter.
Beta Edition: Not yet released.

Vue.js has become the Laravel community's de facto JavaScript library, and for good reason; it shares many of the practical, productive attributes Laravel developers have come to love. Chapter 13 introduces Vue.js' fundamental features, and shows you how to integrate highly interactive and eye-appealing interfaces into your Laravel application.

Chapter 13. Creating an Application API

Current Edition: No applicable chapter.
Beta Edition: Not yet released.

These days a web interface is often only one of several available vehicles for interacting with the underlying data. Popular services such as GitHub, Amazon, and Google also offer an API (Application Programming Interface) which allow enterprising developers to dream up and implement new ways to view, mine, and update these companies' vast data stores. In this chapter you'll learn how to create your own API, and provide registered users with an API key which they'll use to authenticate when interacting with the API.

Chapter 14. Deploying Your Application

Current Edition: Material is generally relevant. See Chapter 9 and Appendix A.
Beta Edition: Not yet released.

"Deploy early and deploy often" is an oft-quoted mantra of successful software teams. To do so you'll need to integrate a painless and repeatable deployment process, and formally define and schedule various maintenance-related processes in order to ensure your application is running in top form. In this chapter I'll introduce the Laravel Command Scheduler, which you can use to easily schedule rigorously repeating tasks. I'll also show you how to optimize your application for deployment. Finally, I'll introduce Laravel Envoyer, demonstrating how incredibly easy it is to deploy your application for just a few dollars a month.