javascript - form not being submitted laravel


I am building a basic form in laravel 5.4.22 but it is not being submitted, when i click on submit it stays on the same page just changing the url to something different I used this Route

    Route::post('/contact/submit', '[email protected]');

This is the controller i made use of


      namespace App\Http\Controllers;

       use Illuminate\Http\Request;

       class MessagesController extends Controller
        public function submit(Request $request){
         this->validate($request, [
              'name' => 'required',
              'email' =>'required'
                 return 'SUCCESS';
                   }; ` 

& here is my contact form


{!! Form::open(['action'=>'[email protected]','method'=>'post']) !!}
     <div >
      {{Form::label('name', 'Name')}}
      {{Form::text('name', '', ['class' => 'awesome form-control', 'placeholder' => 'Enter name'] )}}
     <div >
      {{Form::label('email', 'E-Mail Address')}}
    {{Form::text('email', '', ['class' => 'awesome form-control', 'placeholder' => 'Enter Email id'])}}
    <div >
     {{Form::label('messages', 'Message')}}
    {{Form::textarea('message', '', ['class' => 'form-control', 'placeholder' => 'Enter your message here'])}}
    {{Form::submit('Submit', ['class'=> 'btn btn-primary'])}}
    {!! Form::close() !!}

,This is the main page where i connect the other things

   <!DOCTYPE html>
   <link rel="stylesheet" type="text/css" href="/css/app.css">

  <div >
   <div >
    <div >
    <div >
 <footer id="footer" >
    <p>Copyright 2017 &copy; Dradz</p>

People are also looking for solutions to the problem: php - Related Product text is too high under product in WooCommerce?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.