How to Make Dependent Select Options Based By Another Select Option in FIlamentPHP

Поделиться
HTML-код
  • Опубликовано: 10 июл 2024
  • 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: www.udemy.com/course/masterin...
    💌 Newsletter
    Sign up for my free weekly email newsletter: newsletter.codewithdary.com/
    🔥 Resources
    - Twitter: / codewithdary
    - Instagram: / codewithdary
    - Blog: blog.codewithdary.com/
    - Patreon: www.patreon.com/user?u=30307830
    - GitHub: github.com/codewithdary/filam...
    - TikTok: / codewithdary
    - FilamentPHP Video: • How to Become a PRO in...
    ⌛Timestamps
    00:00 - Introduction
    01:47 - Company & Client Resources
    09:04 - Product Resource / Dependable Select
    20:18 - Outro
    #laravel #codewithdary #filament #web

Комментарии • 30

  • @juanpablosanhueza3811
    @juanpablosanhueza3811 Месяц назад

    Thanks you!! greetings from Chile.

  • @lgoddo3
    @lgoddo3 Месяц назад

    Great! works for me!!

  • @FelipeSantos-ce4hd
    @FelipeSantos-ce4hd 4 месяца назад +1

    Thanks a lot for your great videos. Congratulations from Brazil

    • @codewithdary
      @codewithdary  4 месяца назад

      My pleasure, much love from the Netherlands!

  • @nonamechannel_2022
    @nonamechannel_2022 3 месяца назад

    Thanks a lot, this was super useful!

  • @rickybarabba7866
    @rickybarabba7866 5 месяцев назад +1

    Yes please more ;)

  • @bitsuhaimi
    @bitsuhaimi 5 месяцев назад +2

    Next video, please show how to apply FullCalendar for event management in custom resources. Thank you.

    • @codewithdary
      @codewithdary  5 месяцев назад

      Thank you for your great suggestion!

  • @vugarkhalil
    @vugarkhalil 5 месяцев назад

    Respect ❤

  • @gaton313
    @gaton313 5 месяцев назад +1

    Thanks video

  • @s1mple-youtube24
    @s1mple-youtube24 5 месяцев назад +1

    How to implement calculations on filament (length*width*height/5000) volume

    • @codewithdary
      @codewithdary  5 месяцев назад +1

      For a placeholder, input field, persist it to the database? I need a bit more information :)

    • @s1mple-youtube24
      @s1mple-youtube24 5 месяцев назад

      @@codewithdary OK, please continue for the Laravel filament trick video, I'm interested in your explanation, it's very easy to understand, I hope next there will be a filament tutorial for calculations on forms

  • @kenjivafe
    @kenjivafe Месяц назад

    what if i want it to be based on the user's role? im having a hard time trying to fetch the users with a selected role.

  • @CortStPaul-qx7tu
    @CortStPaul-qx7tu 4 месяца назад

    Great video! Assuming there is only 1 client available in the select as the result of selecting the company is there a way to have the client automatically selected rather than having to pull the dropdown and select the only result?

  • @adrianryff
    @adrianryff 5 месяцев назад +1

    How to storage in database a placeholder ? You can help me

    • @codewithdary
      @codewithdary  5 месяцев назад

      You can't, you shouldn't want to do that either.

  • @haroonalishah1940
    @haroonalishah1940 4 месяца назад +1

    Great video. Do you have udemy full course for Filament library? please let me know

    • @codewithdary
      @codewithdary  4 месяца назад

      Unfortunately I don't. It's just what I have available on RUclips :)

  • @joansalomonnietolopez5374
    @joansalomonnietolopez5374 28 дней назад

    How would it work in the update?

  • @ahmedal-shahethy8719
    @ahmedal-shahethy8719 4 месяца назад

    Is this the end of the playlist or will continue ?

  • @user-ez6zq4tk5d
    @user-ez6zq4tk5d 5 месяцев назад +1

    how to export filtered table data to pdf in filament

  • @SD-pf4fw
    @SD-pf4fw 5 месяцев назад +1

    Great video here's one from me can you show a way to customize error pages that doesn't look vastly different than the application, back in v2 there was a trick in the filament article but now it can't be done with that

    • @codewithdary
      @codewithdary  5 месяцев назад

      Like the 404, 403 pages? You can customize that outside of Filament.

  • @gebruikersnaam999999
    @gebruikersnaam999999 5 месяцев назад +1

    Great content: but I think you mean type-casting or type juggling.