title: Unable to update data with Laravel does not show any error
body: <p>I'm trying to update my data with Laravel. I'm able to create, read, delete the data but somehow i cannot update my data. I already checked my controller,model,route and view but i don't think there's any typo or anything. It only redirects to it's index page without being updated although i have entered new input. There's no error message at all so it makes me more confused of what's wrong because i really don't know why.</p>
  <p><strong>Route for edit and update</strong></p>
  <pre><code>Route::get('contact/{contact}/edit', 'ContactController@edit');
  Route::post('contact/update','ContactController@update');
  </code></pre>
  <p><strong>Controller with edit and update function</strong></p>
  <pre><code>use Illuminate\Http\Request;
  use App\Contact;
  use DB;
  
  public function edit($kode_kontak){
          $contact = DB::table('contact')-&gt;where('kode_kontak',$kode_kontak)-&gt;get();
          return view('contact.edit',['contact' =&gt; $contact]);
      }
  
  public function update(Request $request){
          DB::table('contact')-&gt;where('kode_kontak',$request-&gt;kode_kontak)-&gt;update([
              'email' =&gt; $request-&gt;email,
              'telepon' =&gt; $request-&gt;telepon,
          ]);
          return redirect('contact');
      }
  </code></pre>
  <p><strong>Model</strong></p>
  <pre><code>class Contact extends Model
  {
      public $timestamps = false;
      
      protected $table = 'contact';
  
      protected $fillable = [
          'kode_kontak',
          'kode_pegawai',
          'email',
          'telepon'
          
      ];
  
      protected $primaryKey = 'kode_kontak';
  }
  </code></pre>
  <p><strong>View of edit.blade.php</strong></p>
  <pre><code>&lt;div id=&quot;contact&quot;&gt;
      &lt;h2&gt;Edit Contact&lt;/h2&gt;
      @foreach($contact as $p)
          &lt;form action=&quot;/contact/update&quot; method=&quot;POST&quot;&gt;
          @csrf
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label for=&quot;kode_contact&quot; class=&quot;control-label&quot;&gt;Kode Kontak&lt;/label&gt;
              &lt;input type=&quot;text&quot; name=&quot;kode_kontak&quot; id=&quot;kode_kontak&quot; class=&quot;form-control&quot; value=&quot;{{ $p-&gt;kode_kontak}}&quot; disabled&gt;
          &lt;/div&gt;
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label for=&quot;kode_pegawai&quot; class=&quot;control-label&quot;&gt;Kode Pegawai&lt;/label&gt;
              &lt;input type=&quot;text&quot; name=&quot;kode_pegawai&quot; id=&quot;kode_pegawai&quot; class=&quot;form-control&quot; value=&quot;{{ $p-&gt;kode_pegawai}}&quot; disabled&gt;
          &lt;/div&gt;
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label for=&quot;email&quot; class=&quot;control-label&quot;&gt;Email&lt;/label&gt;
              &lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; class=&quot;form-control&quot; value=&quot;{{ $p-&gt;email}}&quot;&gt;
          &lt;/div&gt;
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label for=&quot;telepon&quot; class=&quot;control-label&quot;&gt;Telepon&lt;/label&gt;
              &lt;input type=&quot;text&quot; name=&quot;telepon&quot; id=&quot;telepon&quot; class=&quot;form-control&quot; value=&quot;{{ $p-&gt;telepon}}&quot;&gt;
          &lt;/div&gt;
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;input class=&quot;btn btn-primary form-control&quot; type=&quot;submit&quot; value=&quot;Simpan&quot;&gt;
          &lt;/div&gt;
      &lt;/form&gt;
      @endforeach
  &lt;/div&gt;
  </code></pre>