Laravel - Getting Started - Deleting Models
To delete a model, you may call the delete
method on the model instance:
use App\Models\Flight;
$flight = Flight::find(1);
$flight->delete();
You may call the truncate
method to delete all of the model's associated database records. The truncate
operation will also reset any auto-incrementing IDs on the model's associated table:
Flight::truncate();