Snippets

Sortable models in Laravel Nova

Playing
Sortable models in Laravel Nova
9 mins1 year ago

Let's take a look at how to implement effortless drag and drop sortable functionality in Laravel Nova, with the help of two packages.

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

Comments

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

Suggested courses

Laravel

Build An Uptime Monitor with Inertia

Ready to dive into Inertia? Let's build a real-world app with Laravel, Inertia and Vue! If you're already working with Inertia, you'll pick up some tips and techniques for future projects. This uptime monitor allows you to create and switch between sites, then add endpoints to monitor with frequency intervals. Using the power of scheduling and queues, it'll automatically alert the email addresses you've added via the UI when an endpoint goes down. In this course, you'll learn to: * Build a real app from scratch with Inertia * Work with Laravel queues * Perform actions on models at user-defined intervals * Work with sub-minute schedules in Laravel * Send out channel notifications with Laravel * Use API resources to simplify Inertia data * Organise apps with events and observers * Create modals in Vue * Perform inline editing with Inertia forms

44 episodes
4 hrs 59 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

Custom Laravel Query Builders

Using Eloquent query scopes in your project? Consider swapping them out for custom query builders. Custom query builders are model-specific, class-based builders that provide better organisation, IDE autocompletion, and more. We'll start this course by defining some standard scopes, refactor them, and discuss the benefits of custom builders. This course is for you if: - You're using query scopes, but they're bloating your models - You're working in a team and need more organisation in your project - You haven't used query scopes and want a primer, plus an alternative

4 episodes
23 mins
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

Build a Livewire CSV Importer

Let's build a powerful CSV importer with Livewire, completely from scratch. This can handle millions of rows, be reused for multiple models, and by using job batches, doesn't require the browser to be open. This course is for you if: - You need a robust importer component for your models that you have full control over - You want to brush up on some advanced Livewire concepts - You want to learn about job batching and queues in Laravel

25 episodes
2 hrs 20 mins