From 964ea904a15ab0a59db28d88e3e9400a20999052 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Wed, 21 Feb 2018 20:18:50 -0600 Subject: [PATCH] Make sure the subfleet type field doesn't have spaces --- app/Models/Subfleet.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/Subfleet.php b/app/Models/Subfleet.php index 6d7486f8..d5348b77 100644 --- a/app/Models/Subfleet.php +++ b/app/Models/Subfleet.php @@ -48,14 +48,14 @@ class Subfleet extends BaseModel parent::boot(); static::creating(function ($model) { - if (filled($model->name)) { - $model->name = str_replace(' ', '_', $model->name); + if (filled($model->type)) { + $model->type = str_replace(' ', '_', $model->type); } }); static::updating(function ($model) { - if (filled($model->name)) { - $model->name = str_replace(' ', '_', $model->name); + if (filled($model->type)) { + $model->type = str_replace(' ', '_', $model->type); } }); }