@alexgodbehere79 I assume you want to truncate a database table. In that case, you can try-
Model::query()->truncate();
Note: Plz replace the word Model with your model name.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I want to truncate laravel model on the console command. Is there any easy way to do that? Thank you in advanced.
@alexgodbehere79 I assume you want to truncate a database table. In that case, you can try-
Model::query()->truncate();
Note: Plz replace the word Model with your model name.
Please or to participate in this conversation.