Schema::table(\'posts\', function (Blueprint $table) { $table->integer(\'user_id\')->unsigned(); $table->foreign(\'user_id\')->references(\'id\')->
If you're using mysql, take a look at the documentation.
In your case it means: If the user is deleted, the post will also be deleted.