title: Error while navigating from edit/id to home and other pages. Navingation stucks at edit/id and changes to edit/add or edit/home instead of resto/home
body: <p>Error while navigating from edit/id to home and other pages. Navingation stucks at edit/id and changes to edit/add or edit/home instead of resto/home . Also while hiting update getting error POST method is not supported 
  This is my route-web code </p>
  
  <pre><code>Route::get('/', function () {
      return view('welcome');
  });
  
  Route::get('home','RestoController@index');
  Route::get('list','RestoController@list');
  Route::post('add','RestoController@add');
  Route::view('add','add');
  Route::get('delete/{id}','RestoController@delete');
  Route::get('edit/{id}','RestoController@edit');
  </code></pre>
  
  <p>This is my edit code </p>
  
  <pre><code>@extends('layout')
  
  @section('content')
  &lt;div class="col-sm-6"&gt;
      &lt;h1&gt;Edit Restaurant&lt;/h1&gt;
  &lt;form action="edit" method="post"&gt;
  @csrf
    &lt;div class="form-group"&gt;
      &lt;label&gt;Name&lt;/label&gt;
      &lt;input type="hidden" name="id" value="{{$data-&gt;id}}"&gt;
      &lt;input type="text" name="name" class="form-control" value="{{$data-&gt;name}}" placeholder="Enter Name"&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;label&gt;Email ID&lt;/label&gt;
      &lt;input type="text" name="email" class="form-control" value="{{$data-&gt;email}}" placeholder="Enter Email ID"&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;label&gt;Address&lt;/label&gt;
      &lt;input type="text" name="address" class="form-control" value="{{$data-&gt;address}}" placeholder="Enter Address"&gt;
    &lt;/div&gt;
    &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;/div&gt;
  
  @stop
  </code></pre>
  
  <p>and This is my Controller code</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Restaurant;
  use Session;
  
  class RestoController extends Controller
  {
      //
      public function index()
      {
          return view('home');
      }
  
      public function list()
      {
          $data= Restaurant::all();
          return view('list',["data"=&gt;$data]);
      }
  
      function add(Request $req)
      {
          // return $req-&gt;input();
          $resto = new Restaurant;
  
          $resto-&gt;name=$req-&gt;input('name');
          $resto-&gt;email=$req-&gt;input('email');
          $resto-&gt;address=$req-&gt;input('address');
          $resto-&gt;save();
          $req-&gt;session()-&gt;flash('status','Restaurant added successfully');
          return redirect('list');
  
      }
  
      function delete($id, Request $req)
      {
          Restaurant::find($id)-&gt;delete();
          Session::flash('status','Restaurant deleted successfully');
          return redirect('list');
  
      }
  
      function edit($id)
      {
          $data= Restaurant::find($id);
          return view('edit',["data"=&gt;$data]);
      }
  
      function update(Request $req)
      {
  
          $resto = Restaurant::find($req-&gt;input('id'));
          $resto-&gt;name=$req-&gt;input('name');
          $resto-&gt;email=$req-&gt;input('email');
          $resto-&gt;address=$req-&gt;input('address');
          $resto-&gt;save();
          $req-&gt;session()-&gt;flash('status','Restaurant updated successfully');
          return redirect('list');
  
      }
  
  }
  </code></pre>
  
  <p>please help me and guide me where i am lacking ? also, while hitting update got error - the POST method is not supported, Thanks </p>