Laravel 10 Livewire Contact Us Form with real-time validations

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 6

  • @graemerobinson6920
    @graemerobinson6920 ปีที่แล้ว

    Can you advise please? I'm encountering an error where laravel isn't recognising the 'ContactFormRequest' file, even though I have one. It comes up whenever I type into the input fields. I've tried "use App\Http\Livewire\ContactFormRequest;: in my web.php file but the problem is still happening

    • @wisdomdiala
      @wisdomdiala  ปีที่แล้ว

      Import the form request inside your controller

    • @graemerobinson6920
      @graemerobinson6920 ปีที่แล้ว

      @@wisdomdiala Hi again, tried that but it's still not working. According to the laravel docs window, it's highlighting ' return (new ContactFormRequest() )->rules(); ' as the problem

    • @wisdomdiala
      @wisdomdiala  ปีที่แล้ว

      @@graemerobinson6920 use this "use App\Http\Requests\ContactFormRequest" inside your controller

    • @graemerobinson6920
      @graemerobinson6920 ปีที่แล้ว +1

      @@wisdomdiala thank you @wisdomdiala, that resolved the problem

    • @wisdomdiala
      @wisdomdiala  ปีที่แล้ว

      @@graemerobinson6920 You're welcome, you can subscribe, like and share the video. Thanks