title: Laravel 5.2 Eloquent create() method shows foreign key exception but save() doesn't show any error
body: <p>Here is the situation:</p>
  
  <p>I have two tables users and projects. Users table has one to many relation with projects table. When I try to insert data in projects table by using <code>Model::create()</code> method, it shows foreign key constraint error. But when I create an instance of Project model and set attribute and use <code>$modelObject-&gt;save()</code> method it works. Below is the code</p>
  
  <p><b>ProjectsController.php (Controller) (function: postStart()) - </b></p>
  
  <pre><code>public function postStart(Request $request)
  {
      $input = $request-&gt;input();
  
      $project = Project::create(array(
          'title' =&gt; $input['title'],
          'main_category_id' =&gt; $input['category'],
          'user_id' =&gt; Auth::id(),
          'slug' =&gt; Helper::slug($input['title']),
      ));
  
      $project['slug'] = Helper::slug($input['title'], $project-&gt;id);
      $project-&gt;save();
  
      return redirect('project/'.$project-&gt;slug.'/edit');
  }
  </code></pre>
  
  <p><b>Project.php (model)</b></p>
  
  <pre><code>class Project extends Model
  {
      protected $fillable = ['user_id', 'main_category_id', 'sub_category_id', 'title', 'slug', 'description', 'project_location', 'project_url', 'project_image', 'type', 'min_bid_amount'];
  
      public static $updatable = ['user_id' =&gt; "", 'main_category_id' =&gt; "", 'sub_category_id' =&gt; "", 'title' =&gt; "", 'slug' =&gt; "", 'description' =&gt; "", 'project_location' =&gt; "", 'project_url' =&gt; "", 'project_image' =&gt; "", 'type' =&gt; "", 'min_bid_amount' =&gt; ""];
  
      public function user() {
          return $this-&gt;belongsTo('User');
      }
  }
  </code></pre>
  
  <p><b>And Here is the error</b></p>
  
  <blockquote>
    <p>QueryException in Connection.php line 673: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (<code>kickstarter</code>.<code>projects</code>, CONSTRAINT <code>projects_user_id_foreign</code> FOREIGN KEY (<code>user_id</code>) REFERENCES <code>users</code> (<code>id</code>)) (SQL: insert into <code>projects</code> (<code>updated_at</code>, <code>created_at</code>) values (2016-05-24 13:00:27, 2016-05-24 13:00:27))</p>
  </blockquote>
  
  <p>But when I insert using <code>$modelObject-&gt;save()</code> method it works. I do not understand what is the problem. It would be very helpful if I found a solution.</p>