Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

delete all records from table using button laravel Eloquent

// Uncomment the below to wipe the table clean before populating

DB::table('table_name')->truncate();

//or

DB::table('table_name')->delete();

MyModel::truncate();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #records #table #button #laravel #Eloquent
ADD COMMENT
Topic
Name
7+9 =