Answers for "how to delete foreign keys eloquent"

PHP
3

laravel remove foreign key

$table->dropForeign('posts_user_id_foreign');
Posted by: Guest on April-22-2020
0

delete all rows in table laravel foreign key

DB::statement("SET foreign_key_checks=0");
Model::truncate();
DB::statement("SET foreign_key_checks=1");
Posted by: Guest on September-02-2021

Browse Popular Code Answers by Language