Answers for "soft delete table laravel"

PHP
1

laravel clear table

// Delete everythin in the table

// Option 1 
Project::truncate();

// Option 2
Project::whereNotNull('id')->delete();

// Option 3
Project::where('id', 'like' '%%')->delete();

// Option 4
DB::table('projects')->delete();
Posted by: Guest on September-28-2021
1

how delete the table in laravel in the commend

php artisan migrate:reset
Posted by: Guest on April-10-2021

Browse Popular Code Answers by Language