Schema::table(\'posts\', function (Blueprint $table) { $table->integer(\'user_id\')->unsigned(); $table->foreign(\'user_id\')->references(\'id\')->
It means that if you delete the 'user' linked, the 'posts' linked to that user will also automatically be deleted.