title: Laravel Controller update method not working
body: <p>I am new in Laravel. </p>
  
  <p>I made  controller, Model and views by <strong>way/generator</strong> by composer <code>php artisan generate:scaffold cities</code> and Its index page (Create and store method) Working well but I don't know what is the problem with <code>update</code> method.</p>
  
  <p>This is my CitiesController method(<strong>Update</strong>):</p>
  
  <pre><code>public function update($id)
  {
      $city = City::findOrFail($id);
  
      $validator = Validator::make($data = Input::all(), City::$rules);
  
      if ($validator-&gt;fails())
      {
          return Redirect::back()-&gt;withErrors($validator)-&gt;withInput();
      }
  
      $city-&gt;update($data);
      return Redirect::route('admin.cities.index');
  }
  </code></pre>
  
  <p>This is my model (<strong>city</strong>):</p>
  
  <pre><code>class City extends \Eloquent {
     protected $primaryKey='city_id';
  
      public static $rules = [
           'name'     =&gt; 'required',
           'image'     =&gt; 'mimes:jpeg',
           'parent_id' =&gt; 'required',
           'name'      =&gt; 'required',
           'english_name'=&gt;'unique:cities,english_name|required'
  
      ];
      protected $fillable = ['name', 'parent_id', 'english_name','population','phone_prefix','image'];
  }
  </code></pre>
  
  <p>And this is my view (<strong>edit</strong>):</p>
  
  <pre><code>&lt;ul&gt;
      {{ Form::model($city,array('route'=&gt;array('admin.cities.update',$city-&gt;id),'method'=&gt;'PUT','files'=&gt;true)) }}
      &lt;!--Here I included my form--&gt;
      @include('admin.forms._partial.formcity')
      &lt;li&gt;
          {{ Form::submit('submit') }}
      &lt;/li&gt;
      {{ Form::close() }}
  &lt;/ul&gt;
  </code></pre>
  
  <p>And this is my Route:</p>
  
  <pre><code>Route::group(array('prefix'=&gt;'admin','before'=&gt;'Auth'),function(){
      Route::resource('cities', 'CitiesController');
  });
  </code></pre>
  
  <p>When I click on submit button Laravel throwout this error:</p>
  
  <blockquote>
    <p>Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException</p>
  </blockquote>
  
  <p><strong><em>note</strong>:My view works well. I think the problem is from controller method, and other methods of this controller like <code>create</code> and <code>store</code> works well too.</em></p>