MethodNotAllowedHttpException No message

Posted 1 year ago by Geoff_256

I think I'm having issues with my routes here is my route

Route::post('/auditor/update', array( "as" => "auditor.update", "uses" => "[email protected]")); Route::get('/auditor/{id}/show', array( "as" => "", "uses" => "[email protected]" )); Route::get('/auditor/{id}/edit', array( "as" => "auditor.edit", "uses" => "[email protected]" ));


public function update(Request $request, $id) { request()->validate([ 'name' => 'required', 'phone_number' => 'required', ]); Auditor::find($id)->update($request->all()); return redirect()->route('auditor.index') ->with('success','Auditor updated successfully'); } Blade

{!! Form::model($auditor, ['method'=>'PATCH', 'route' => ['auditor.update', $auditor->id]]) !!}
  <div class="row">
      <div class="form-group col-md-1"><strong>Name </strong></div>
      <div class="col-md-2"> {!! Form::text('name', null, array('class' => 'form-control')); !!} </div>
  <div class="row">
      <div class="form-group col-md-1"><strong>Phone Contact </strong></div>
      <div class="col-md-2"> {!! Form::text('phone_number', null, array('class' => 'form-control')); !!} </div>

  <div class="row text-center">
      <div class="form-group col-md-1"><strong>Designation </strong></div>
      <div class="col-md-2"> {!! Form::text('designation', null, array('class' => 'form-control')); !!} </div>
  <div class="row">
      <div class="form-group col-md-1"><strong>Organization </strong></div>
      <div class="col-md-2"> {!! Form::text('organization', null, array('class' => 'form-control')); !!} </div>

   <div class="row">
      <div class="form-group col-md-1"><strong>Email </strong></div>
      <div class="col-md-2"> {!! Form::email('email', null, array('class' => 'form-control')); !!} </div>

    <div class="col-xs-12 col-sm-12 col-md-12 text-center">

            <button type="submit" class="btn btn-primary">Submit</button>

{!! Form::close() !!}

Have lost enough hair on this .....I kindly seek your help

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.