Question:Which of the following is the correct way to request the update function of the resource controller? 

A 
<form action="{{route('blog.update',$blog[0]->id)}}" method="post">
  @csrf 
  @method('PUT')
  <textarea  name="txtTitle" > 
   {{$blog[0]->title}}
  </textarea> 
  <input type="submit" value="Update" />
</form>
 

B 
<form action="{{route('blog.update',$blog[0]->id)}}" method="post">
  @csrf 
  @method('UPDATE')
  <textarea  name="txtTitle" > 
   {{$blog[0]->title}}
  </textarea> 
  <input type="submit" value="Update" />
</form>
 

C 
<form action="{{route('blog.update',$blog[0]->id)}}" method="post">
  @csrf 
  <textarea  name="txtTitle" > 
   {{$blog[0]->title}}
  </textarea> 
  <input type="submit" value="Update" />
</form>
 

D 
<form action="{{route('blog.update',$blog[0]->id)}}" method="post">
  @csrf 
  @method('POST')
  <textarea  name="txtTitle" > 
   {{$blog[0]->title}}
  </textarea> 
  <input type="submit" value="Update" />
</form>
 

+ Answer
+ Report
Total Preview: 914

Copyright © 2024. Powered by Intellect Software Ltd