In this tutorial, we're going to explore how to make the options of one select depend on the value of another select. We'll start by creating the necessary form components using Filament, a powerful Laravel admin panel package. We'll define the fields and set up the necessary relationships between the models. Then, we'll dive into the code and implement the logic to make the options reactive.
To achieve this, we'll leverage Filament's `Get` class, which allows us to access request input data. We'll use the `Get` class to check the value of the "Company" field and dynamically update the options for the "Client" field based on the selected company. Throughout the tutorial, we'll walk through the code step-by-step, explaining each concept and demonstrating the functionality in real-time. By the end of this tutorial, you'll have a solid understanding of how to create reactive select fields in Filament and enhance the user experience of your applications.
📚 New Udemy Course
If you're looking to level up your Laravel skills? My new course "Mastering Laravel 10 Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: https://www.udemy.com/course/masterin...
💌 Newsletter
Sign up for my free weekly email newsletter: https://newsletter.codewithdary.com/
🔥 Resources
Twitter: / codewithdary
Instagram: / codewithdary
Blog: https://blog.codewithdary.com/
Patreon: https://www.patreon.com/user?u=30307830
GitHub: https://github.com/codewithdary/filam...
TikTok: / codewithdary
FilamentPHP Video: • How to Become a PRO in FilamentPHP v3...
⌛Timestamps
00:00 - Introduction
01:47 - Company & Client Resources
09:04 - Product Resource / Dependable Select
20:18 - Outro
#laravel #codewithdary #filament #web