Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Browse all series

Laravel Cookbook

Welcome to the Laravel Cookbook! This series is all about building practical features for typical Laravel web application. Charts, stats, and image uploaders are just a few examples that we'll be reviewing together. We'll also leverage various JavaScript libraries whenever we require additional interactivity for a better user experience. Let's get started!

Progress

Series Info

Episodes
12
Run Time
3h 47m
Difficulty
Intermediate
Last Updated
Aug 16, 2022
Version
Latest

Series Episodes

  1. Episodes (12)
    1. Charts and Queries

      Let's begin by learning how to visualize data as a chart. This might be useful for an admin dashboard or for a single user's data upon logging in. We'll take a look at how we can render charts using the popular Chart.js library. Then we'll formulate a query to fetch the necessary data from our backend. Finally, we'll pass that data to our front-end to display it on a chart.
    2. Dynamic Charts with Livewire and Alpine

      It would be nice if we could update our chart based on certain parameters that the user selects. We could do this with JavaScript and an AJAX request, but we'll instead do it using Livewire and Alpine. We'll wrap our Chart.js code in an Alpine Component, refactor our backend code to use Livewire and have them communicate with one another to update the chart.
    3. Stats Cards

      You'll often see admin dashboards presenting stats and important information as cards. Let's take a look at how we can implement this ourselves, and also how to make it more dynamic with Livewire.
    4. Making Content Editable

      Sometimes, you'll want to make certain parts of your site editable so anyone with the correct permissions can update content through a UI. Let's take a look at how we can accomplish this, and also provide the user with text formatting options with a WYSIWYG editor.
    5. Uploading Images with Laravel

      Let's take a look at how we can upload an image with just Laravel and the native file input to start. We'll also look at how to process and resize the image on the server using the Intervention Image PHP package.
    6. FilePond Image Uploads

      Let's enhance the experience of our image uploads by leveraging the popular FilePond JavaScript library. We'll add features such as image previews, automatic file validation, automatic uploads, and resizing images directly on the client.
    7. Laravel Task Scheduler

      The Laravel Task Scheduler allows us to easily schedule tasks with its fluent syntax and convenient methods. Let's add a task that cleans up old files in a temporary folder on a schedule.
    8. Share Code Between Create and Edit Forms

      You'll often find that your forms for creating and updating certain models have a lot of duplicate code. Let's take a look at one way of DRYing up our code so future updates are more maintainable.
    9. API Tokens with Sanctum

      Whenever you want to provide other applications access to your data, you'll need to create API-specific routes. Sanctum allows you to issue API tokens that can be used to authenticate API requests. In this video, we take a look at an example of how to create tokens, and use them in API routes that need to be protected.
    10. Drag and Drop with Persistence and Ordering

      You'll often reach for a Drag and Drop UI whenever you need to put your data in some sort of order. In this video, we'll take a look at how we can accomplish this using a Livewire plugin, all while persisting the order in the database as well.
    11. Laravel Localization

      Laravel provides many useful methods and tools for localizing your application. However, there are a lot of things to consider, such as where your strings come from and how we can set the locale across all requests. In this video, we'll review an example of how we might approach this problem.
    12. HTTP Client Examples

      If you need to make requests to external APIs, you can leverage the HTTP client that's built right into Laravel. It offers an expressive and fluent syntax that supports everything you need to do when making requests. We'll utilize a few external APIs to see how we can use the HTTP client as well as some of its features.

Continue Learning