This should be straightforward but I can't find it in the documentation or elsewhere. How can I TRUNCATE...CASCADE
a table with foreign keys in Laravel 5.1 using the Eloquent ORM? Using just User::truncate();
doesn't pass through the CASCADE
argument.
Looks like the only way to do this is by running the statement directly:
DB::statement('TRUNCATE users CASCADE');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With