Geoff_256

Experience

60

0 Best Reply Awards

  • Member Since 11 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

5th October, 2017

Geoff_256 left a reply on MethodNotAllowedHttpException No Message • 11 months ago

@Dry7 same error

Geoff_256 started a new conversation MethodNotAllowedHttpException No Message • 11 months ago

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" => "auditor.show", "uses" => "[email protected]" )); Route::get('/auditor/{id}/edit', array( "as" => "auditor.edit", "uses" => "[email protected]" ));

Controller

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]]) !!}
  {{csrf_field()}}
  <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> 
  <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> 

  <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> 
  <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> 

   <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> 

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

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



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

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

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.