I am submitting a form directly without using Ajax request, I want to show loader when getting a response from the backend. How is it possible?
{!! Form::open(['route' => ['patient_signup'], 'method' => 'post', 'name' => 'sign_up_form']) !!}
and in controller
public function patient_signup()
{
if ($result) {
return redirect(route('home'))->with('success', $message);
} else {
return Redirect::back()->withInput()->with('error', $message);
}
}
Everything working fine but I want to show loader when getting a response from the backend. Please provide me a better solution.
You can add div tag after body tag like below
In css
then in JavaScript
Updated
then in JavaScript