Laravel 10 Livewire Contact Us Form with real-time validations

Поділитися
Вставка
  • Опубліковано 21 жов 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