Easy Laravel 5: A Hands On, 300 Page Book Using a Real-World Project!

Easy Laravel is a fun, hands-on book introducing the popular Laravel framework. You’ll learn by doing, following along with the development of a real-world Laravel-driven web application.

Buy the Book for just $27

Book Highlights

  • Based on Laravel 5 and regularly updated. See the changelog.
  • Introduces Laravel best practices and popular third-party packages to help you become insanely productive fast.
  • Shows you how to test controllers, models and views so you can be confident your code is rock solid.
  • Helps you to master the Eloquent ORM and deftly manipulate and navigate your model relationships.
  • Explains how to effectively manage your project CSS and JavaScript, and easily integrate Bootstrap.
  • Includes a thorough introduction to forms integration and validation.
  • Shows you how to effortlessly deploy your Laravel applications.

Video Workshop Now Available!

This video workshop consists of 39 videos totaling almost 3.5 hours of companion video, and covers topics such as RESTful controllers, forms processing using Laravel 5’s new form requests feature, Less CSS and CoffeeScript compilation with Elixir, the Blade templating engine, Eloquent, and much, much more. Learn more about the workshop here.

Table of Contents

Easy Laravel 5 is divided into twelve chapters and two appendices covering the fundamental topics most critical to today’s Laravel developer.

Chapter 1. Introducing Laravel

In this opening chapter you’ll learn how to create and configure your Laravel project both using your existing PHP development environment and Laravel Homestead. I’ll also show you how to properly configure your environment for effective Laravel debugging, and how to expand Laravel’s capabilities by installing several third-party Laravel packages that promise to supercharge your development productivity. We’ll conclude the chapter with an introduction to PHPUnit, showing you how to create and execute your first Laravel unit test!

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

In this chapter you’ll learn how to create controllers and actions, and define the routes used to access your application endpoints using Laravel 5’s new route annotations feature. 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 managing Gulp tasks, and show you how to integrate the popular Bootstrap front-end framework and jQuery JavaScript library. We’ll conclude the chapter with several examples demonstrating how to test your controllers and views using PHPUnit.

Chapter 3. Talking to the Database

In this chapter we’ll turn our attention to the project’s data. You’ll learn how to integrate and configure the database, create and manage models, and interact with the database through your project models. You’ll also learn how to deftly configure and traverse model relations, allowing you to greatly reduce the amount of SQL you’d otherwise have to write to integrate a normalized database into your application.

Chapter 4. Model Relations, Scopes, and Other Advanced Features

Building and navigating table relations is a 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. You’ll also learn about a great feature known as scopes which encapsulate the logic used for more advanced queries, thereby hiding it from your controllers.

Chapter 5. Integrating Web Forms

Your application will almost certainly contain at least a few web forms, which will likely interact with the models, meaning you’ll require a solid grasp on Laravel’s form generation and processing capabilities. While creating simple forms is fairly straightforward, things can complicated fast when implementing more ambitious solutions such as forms involving multiple models. In this chapter I’ll go into extensive detail regarding how you can integrate forms into your Laravel applications, introducing Laravel 5’s new form requests feature, covering both Laravel’s native form generation solutions as well as several approaches offered by popular packages. You’ll also learn how to upload files using a web form and Laravel’s fantastic file upload capabilities.

Chapter 6. Integrating Middleware

Laravel 5 introduces middleware integration. In this chapter I’ll introduce you to the concept of middleware and the various middleware solutions bundled into Laravel 5. You’ll also learn how to create your own middleware solution!

Chapter 7. Authenticating and Managing Your Users

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.

Chapter 8. Deploying, Optimizing and Maintaining Your Application

“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 5 Command Scheduler, which you can use to easily schedule rigorously repeating tasks. I’ll also talk about optimization, demonstrating how to create a faster class router and how to cache your application routes. Finally, I’ll demonstrate just how easy it is to deploy your Laravel application to the popular hosting service Heroku, and introduce Laravel Forge.

Chapter 9. Creating a Restricted Administration Console

This chapter shows you how to identify certain users as administrators and then grant them access to a restricted web-based administrative console using a prefixed route grouping and custom middleware.

Chapter 10. Introducing the Lumen Microframework

This chapter introduces the new Laravel Lumen microframework. You’ll learn all about Lumen fundamentals while building a companion microservice for the TODOParrot companion application!

Chapter 11. Introducing Events

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 5.1’s fascinating event broadcasting capabilities, accompanied by a real-world example.

Chapter 12. Introducing Vue.js

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 12 introduces Vue.js’ fundamental features, and shows you how to integrate highly interactive and eye-appealing interfaces into your Laravel application.

Buy the Book

Wow this table of contents looks awesome! Head on over to the purchase page now and select your book package!

Reader Comments

The book is easy to read and has cleared up a lot of things I’d missed when working with Laravel 4 and in the process of migrating to Laravel 5. Robin Layfield

Fantastic book, really helpful, useful, readable and informative. Probably the best book on Laravel I have read. Derek McWhinnie

Easy Laravel 5 was quite refreshing even though I bought it at a time when I was already an experienced Laravel developer. Steve Popoola

Your book Easy Laravel 5 … has proved to be the most valuable resource I have found for gaining a grasp on Laravel. Brian Patrick

I am reading your book and must say it is very clear and well written! Filippo Mascoli

Thank you for creating this awesome book! Mohammad Mubashar Aftab, CEO, Urbanify

I love your writing style and clarity. It’s very easy to follow and it makes learning Laravel extremely easy. Scott Carpenter

This book is great! It’s easy to read, straight to the point and detailed enough to understand Laravel features Edmond Chan

Practical and concise, this book will get you up to speed for building a real-world application! Johnny Philavanh

Thank you for writing the book… The style is very nice to read compared to other technical books I have read. Ingram M.

Your Laravel 5 Book is GREAT Nick Daws

Amazing! Just Amazing! What a well done book. Naveed Tahir-Kheli

Working my way through “Easy Laravel 5” book. I highly recommend it. Jack Barham

Your Easy Laravel 5 book is absolutely fantastic, well done and thank you. Rich Lovelock

I’m loving the book. You have skill in making difficult things readable. Doug N.

I just finished reading Easy Laravel 5 and must say it was an interesting read. Rajani I.