Livewire 3 CRUD with Modal and Form Objects

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • A summarized example project from one of our Laravel Daily tutorials.
    Original tutorial: laraveldaily.c...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses: laraveldaily.c...
    - Laravel QuickAdminPanel: quickadminpane...
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: us11.campaign-...
    - My personal Twitter: / povilaskorop

КОМЕНТАРІ • 40

  • @StefanKressCH
    @StefanKressCH 11 місяців тому +2

    I still don't get why most tutorials use some custom implementation of modals instead of using the element. The biggest issue with s is, that child modals would live inside it - with all the mess of teleporting or being restricted by inner sizes. is acting as a 'regular' application feeling with no hassle. i have rewritten the jetstream modal for this purpose and it works like charm. if anyone is interested, let me know - probably there is still room for improvement.

  • @MarijanKopcic
    @MarijanKopcic 9 місяців тому +1

    This is great, thanks for the tips. IMHO too much hustle for s simple modal :)

  • @danyalvarez6282
    @danyalvarez6282 6 місяців тому

    el product-form tengo que crearlo??, ya que con los comando no se crea automáticamente

  • @sigalzahavi1296
    @sigalzahavi1296 11 місяців тому

    Thank you for this tutorial. I started using modals on my new laravel 10 livewire 3 project. My issue is that when the modal opens the user needs to click on the first input field. It does not focus on the field automatically and that's annoying. Am I doing something wrong or is that just how it works?

  • @arischannel8168
    @arischannel8168 11 місяців тому

    Better than use custom modal or require component modal like on this video ?👀👀

  •  11 місяців тому

    Thanks, thanks, thanks.

  • @albertabraham99
    @albertabraham99 11 місяців тому

    Hi Sir, what a recomendation for table in livewire? Can yajra use in livewire?

    • @LaravelDaily
      @LaravelDaily  11 місяців тому

      I would recommend using Filament tables, you can use them outside of Filament, too

  • @Mursalsadatat
    @Mursalsadatat 11 місяців тому

    Hi, How can I pass a hidden filed input in Laravel Livewire?

  • @MateuszSerwinowski
    @MateuszSerwinowski 11 місяців тому

    Hi, great material. I'm just wondering how to create more advanced forms when in addition to the basic product data there is a relationship between other tables like several prices or product sizes.

    • @LaravelDaily
      @LaravelDaily  11 місяців тому

      I have quite a few of such examples in my Livewire Kit: livewirekit.com/

  • @DarkVictor_
    @DarkVictor_ 11 місяців тому

    ❤ Its amazing

  • @ethanbenjamin9468
    @ethanbenjamin9468 8 місяців тому

    How do I call the modal without using the button. I mean from class component. Probably after doing some logic and want to display the result on modal

    • @Shiv-vb1re
      @Shiv-vb1re 7 місяців тому

      Use js and add a event listener

  • @MAAZKHAN-xv1lc
    @MAAZKHAN-xv1lc 11 місяців тому

    Hi. How can we show the pop-up automatically on page load in Livewire 3? I want to show some important reminders to specific users in their dashboards. Thank you in advance.

    • @LaravelDaily
      @LaravelDaily  11 місяців тому

      Personally, I wouldn't show pop-up automatically, it's a very bad UX practice, in my opinion. Send emails instead or show some notification on top as alert with bold/color. But not pop-up.

    • @MAAZKHAN-xv1lc
      @MAAZKHAN-xv1lc 11 місяців тому

      @@LaravelDaily Yes, you are alright. I already communicated with the client about this, but he said to use the pop-up. It is basically to show the daily reminders to managers in their dashboard using a pop-up e.g. Manager 1, you have the meeting with client on 3rd October. When the manager opens his dashboard on 3rd Oct, then pop-up will show the reminder text.

    • @krekas
      @krekas 11 місяців тому +1

      @@MAAZKHAN-xv1lc I assume you are using Livewire so in the mount method add whatever is needed

    • @MAAZKHAN-xv1lc
      @MAAZKHAN-xv1lc 11 місяців тому

      @@krekas Yes. I think I have done this. Thank you for your help and valuable suggestions.

  • @reelsergealain
    @reelsergealain 11 місяців тому

    I really love your work, but can I suggest some examples of projects I want us to do together?❤

    • @LaravelDaily
      @LaravelDaily  11 місяців тому

      Define "together". Currently I'm not looking to expand my team and hire more developers. I do accept project ideas for future videos, but they should be based on how much useful they would be to larger group of developers, not an idea for a single individual project/problem.

    • @DeTechDivus
      @DeTechDivus 11 місяців тому

      @@LaravelDaily could be messy but some some open source community based project where we would have list of 300+ tasks and random people choose random tasks to work on?

    • @LaravelDaily
      @LaravelDaily  11 місяців тому

      I don't have to MANAGE such "mess", unfortunately :) but if anyone starts something like this, I would be happy to spread the message

  • @DarwinBueno-pv7hn
    @DarwinBueno-pv7hn 7 місяців тому

    Puede hacer un update con tomselect o Select2

  • @saeeedkhan
    @saeeedkhan 11 місяців тому

    When we will watch TDD for this video tuts?

    • @LaravelDaily
      @LaravelDaily  11 місяців тому +1

      When more people ask for TDD tutorials. For now as long as I released something about TDD, the videos had very low viewership rate.

  • @roberttudor_
    @roberttudor_ 11 місяців тому

    I noticed that the Form object does not make use of Livewire's newest features like Attributes or filling the properties from the model to the form using the fill() method. Was this a deliberate choice? In cases where there are only a couple of attributes, may be simple, but once the number of properties get to a bigger number it may become cumbersome to maintain.

    • @LaravelDaily
      @LaravelDaily  11 місяців тому +1

      It's a personal preference. On this channel, I already had a few videos discussing new Livewire 3 features and pros/cons.

    • @krekas
      @krekas 11 місяців тому

      In this tutorial there is also a unique rule which doesn't work with attributes.

  • @leGeekDuSEO
    @leGeekDuSEO 4 місяці тому

    Unable to call component method. Public method [$emit] not found on component

    • @LaravelDaily
      @LaravelDaily  4 місяці тому

      In Livewire 3, the method emit() is renamed to dispatch().

  • @MarkSnape
    @MarkSnape 11 місяців тому

    Hi Povilas. Please try and differentiate pronunciation between Model and Modal "mowdal". I see a lot of confusion between these two words by non-native english speakers and often typing of model when they mean modal. Not meaning to be critical when you bring so much to the community

    • @LaravelDaily
      @LaravelDaily  11 місяців тому

      I'm actually having trouble with it myself, was thinking about exact same words the other day. But even if I do as you suggest, I don't think that "mowdal" would be that much clearer. Maybe I should make an emphasis like "mowdAl". Will keep an eye (tongue) on it.

    • @MarkSnape
      @MarkSnape 11 місяців тому

      @@LaravelDaily perhaps pronounce it as if two words mow dal ?

    • @martin.j.osborne
      @martin.j.osborne 11 місяців тому +1

      @LaravelDaily 'Modal' is pronounced "mow" (as in mow the lawn) -"dəl" (where ə is a schwa, like the first and last syllables of "banana" as pronounced by a native speaker). "Model" is pronounced "mod" (as in the first syllable of 'modern') -"əl". In both cases the stress is on the first syllable.
      Or perhaps an easier way to explain it is: 'modal' rhymes with 'yodel', and 'model' rhymes with 'coddle'.

  • @JamesAutoDude
    @JamesAutoDude 11 місяців тому

    The question is... To use modal or not to use modal 😢

    • @LaravelDaily
      @LaravelDaily  11 місяців тому +1

      Personally, I'm not a big fan of modals. But for such simple 2-field forms, totally fine :)

    • @JamesAutoDude
      @JamesAutoDude 11 місяців тому

      @@LaravelDaily ah I see so maybe for small amounts of input but otherwise a whole new page is best 😎

    • @LaravelDaily
      @LaravelDaily  11 місяців тому +1

      It's a personal preference, in general