on delete cascade laravel migration code example
Example 1: cascade in laravel migration
$table->dropForeign('answers_user_id_foreign');
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
Example 2: delete a migration laravel
// delete a migration safely from laravel
delete migration from database/migrations/ directory
and also delete entry from migrations table