laravel truncate table code example
Example 1: truncate table laravel eloquent
MyModel::truncate();
Example 2: laravel truncate string laravel 8
use Illuminate\Support\Str;
$truncated = Str::limit('The quick brown fox jumps over the lazy dog', 20);
// The quick brown fox...
Example 3: truncate table laravel eloquent
Visitor::query()->truncate();