title: Laravel 8 : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
body: <p>i have this problem in Laravel 8 on postman  :</p>
  <p>SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (<code>sayara_wipou2021</code>.<code>post</code>, CONSTRAINT <code>post_user_id_foreign</code> FOREIGN KEY (<code>user_id</code>) REFERENCES <code>users</code> (<code>id</code>) ON DELETE CASCADE ON UPDATE CASCADE) (SQL: insert into <code>post</code> (<code>id</code>, <code>title</code>, <code>description</code>, <code>price</code>, <code>category_id</code>) values (?, post700, description de post 700, 7800.00, 1))</p>
  <p>I can not understand what is the problem on my code !
  just i want to add Post with ForeignKey category_id</p>
  <p>this is my Postcontroller :</p>
  <pre><code> public function store(Request $request)
  {
      $post = new post();
      $post-&gt;id             = $request-&gt;id             ;  
      $post-&gt;title          = $request-&gt;title          ;
      $post-&gt;description    = $request-&gt;description    ;
      $post-&gt;price          = $request-&gt;price          ;  
      $post-&gt;category_id      = $request-&gt;category_id  ;  
      if($post-&gt;save()){
          return new PostResource($post);
      }
     }
  </code></pre>
  <p>this my PostModel:</p>
  <pre><code>protected $fillable = 
  [
      'id',
      'title',
      'description',
      'price'   , 
      'category_id',   
      'picture'
  ];
   public function categories(){
      return $this-&gt;belongsTo(Categories::class,'category_id');
  }
  </code></pre>
  <p>this my postTable :</p>
  <pre><code> public function up()
  {
      Schema::create('post', function (Blueprint $table) {
          $table-&gt;bigIncrements('id', true)-&gt;unsigned();
          $table-&gt;String('title');
          $table-&gt;text('description');
          $table-&gt;decimal('price', 17)-&gt;unsigned()-&gt;nullable();
          $table-&gt;integer('category_id')-&gt;unsigned();
          $table-&gt;foreign('category_id')-&gt;references('id')-&gt;on('categories')-&gt;onUpdate('cascade')-&gt;onDelete('cascade'); }
  </code></pre>
  <p>this is CategoriesModel :</p>
  <pre><code> protected $fillable = ['name','description','picture'];
  
  public function posts(){
      return $this-&gt;hasMany(Post::class);
  }
  </code></pre>