We will look at a couple of common scenarios where adding a couple of lines to your tests can future-proof your application from data loss when using Model Observers.
PHP
Preventing Destructive Commands from Running in Laravel
Read about how to use the IlluminateConsoleProhibitable trait to prevent destructive commands from running in your Laravel application. We’ll also look at how to prevent your own custom Artisan commands from running using this trait. Read more…