Routes problem in Laravel and Page not found Routes problem in Laravel and Page not found laravel laravel

Routes problem in Laravel and Page not found


To answer your email problem

try to add the following in your .env file

# For Localhost EmailMAIL_DRIVER=smtpMAIL_HOST=smtp.googlemail.comMAIL_PORT=587MAIL_USERNAME=myemail@gmail.comMAIL_PASSWORD=mypasswordMAIL_ENCRYPTION=tls# For Hosting EmailMAIL_DRIVER=sendmailMAIL_HOST=smtp.googlemail.comMAIL_PORT=465MAIL_USERNAME=myemail@gmail.comMAIL_PASSWORD=mypasswordMAIL_ENCRYPTION=ssl

these credentials are for gmail-based email, don't forget to do these steps:

  1. Go to your Google Account.
  2. On the left navigation panel, click Security.
  3. On the bottom of the page, in the Less secure app access panel, click Turn on access.


Seems you are missing the csrf-token in the form.Add the csrf field in the form as below:

<input type="hidden" name="_token" id="csrf-token" value="{{ Session::token() }}" />

OR

{!! Form::token() !!}

Hope, this will resolve your issue.


Please share the complete code of forms

i have checked your function and form and routes there is no bugs

I think that the data from the form is staring in the database but the redirecting after the store is throwing error

I am not daam sure but may be

So Try Changing the

FROM

 return Redirect::to('/')->with('message', 'Application added successfuly');

TO

return redirect()->back()->with('message','Application added successfuly');

And alsoFROM

{{Form::open(array('route'=>'contact_us','method'=>'post'))}}

TO

  {!! Form::open(['route' => ['contact_us']]) !!}  @method('POST')