Snippets

Dynamic breadcrumbs in Laravel

Playing
Dynamic breadcrumbs in Laravel
21 mins5 years ago

Build a partial to generate dynamic breadcrumbs based on your route structure, with plenty of refactoring along the way.

Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No comments, yet. Be the first to leave a comment.

Suggested courses

Laravel

Liking Things in Laravel with Redis

Let’s skip the database and build the ability to like any model in Laravel, using Redis. Traditionally you’d reach for the database for this kind of thing, but as you load more models and start performing checks within relationships — things begin to slow down. With a key-value store like Redis, tracking users who have liked comments (or anything) keeps everything ridiculously fast.

6 episodes
21 mins
Laravel

Enums in Laravel

Enums make working with multiple potential column values a breeze (think order statuses). Let's use an Enum in Laravel and cover storing, validating and accessing Enums. By the end of the course, you'll be able to implement Enums in Laravel with ease, and make sure your multiple choice column data is strict and easy to globally update across your entire application.

9 episodes
31 mins
Laravel

Logging Unique Views in Laravel with Redis

If you need to log unique views in Laravel, you might reach for a database table to track IP addresses or another unique piece of data. Let's take a look at speeding things up both in performance and complexity by using Redis and the HyperLogLog probabilistic data structure. Once we're done, we'll set up a period command to sync views back to the database for easy ordering, and then create a trait to share functionality between other models.

4 episodes
22 mins
Laravel

Dropdown Autocomplete Search Anything in Laravel

Using the power of Laravel Scout and Meilisearch, let’s build an instant dropdown search in your Laravel apps. We’ll start with the basics of indexing data, then use the JavaScript autocomplete library to instantly show results as the user types — even multiple sources at the same time!

12 episodes
1 hr 3 mins
Laravel

Custom User Subdomains in Laravel

Allow users to choose their own subdomain, and give them their own area of your application where only their details are shown. You'll be able to register multiple routes for user areas. Everything in this short course can be easily applied to your own applications where you need this functionality. We'll cover every step of the way, and some things to watch out for. Finally, we'll learn how to deploy this and configure nginx and DNS records so you're ready to go.

9 episodes
31 mins