Laravel truncate table
DB::table(‘table_name’)->truncate(); is used to truncate table in laravel.
Laravel truncate table example
Below is the simple example for Laravel truncate table
DB::table('users')->tuncate();
Will truncate the users table.
Advertisements