Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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();
 
PREVIOUS NEXT
Tagged: #laravel #clear #table
ADD COMMENT
Topic
Name
7+3 =