title: Laravel 5.5 Method save does not exist when updating entries with modified primary key
body: <p>I am working with laravel 5.5 to update entries. The problem is after changing the primary key 'id', which is elequoent default pk to 'project_id'. adding an item works fine but updating an item is not working properly. Here is the error I am getting.</p>
  
  <blockquote>
    <p>Method save does not exist.</p>
  </blockquote>
  
  <p>Here is my Model.</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Project extends Model
  {
     protected $primaryKey = 'project_id';
      public function user()
      {
          return $this-&gt;belongsTo(User::class);
      }
      public function tasks()
      {
          return $this-&gt;hasMany(Task::class);
      }
  }
  </code></pre>
  
  <p>Here is my controller function.</p>
  
  <pre><code>public function editProject($id){
  
          $project = Project::where('project_id', $id)-&gt;firstOrFail();
          $data = ["project_info" =&gt; $project];
          return view('projects.edit')-&gt;with($data);
      }
      public function updateProject(Request $request){
          $data = $request-&gt;all();
          $validator = Validator::make($data, [
              'project_title' =&gt; 'required',
              'project_description' =&gt; 'required',
              'project_start_date' =&gt; 'required',
              'project_end_date' =&gt; 'required',
              'project_status' =&gt; 'required',
          ]);
  
          $response = [];
  
          if ($validator-&gt;fails()){
              $response["errors"] = [$validator-&gt;messages()-&gt;first()];
              $response["success"] = false;
              return json_encode($response);
          }
  
          else{
              $project = Project::where("project_id", $request-&gt;input('project_id'))-&gt;get();
              $project-&gt;project_title = $request-&gt;project_title;
              $project-&gt;user_id = Session::get('user_id');
              $project-&gt;project_description = $request-&gt;project_description;
              $project-&gt;project_start_date = $request-&gt;project_start_date;
              $project-&gt;project_end_date = $request-&gt;project_end_date;
              $project-&gt;project_status = $request-&gt;project_status;
              $project-&gt;save();
              return redirect('/listProjects');
          }
      }
  </code></pre>