From c810446ae0dc1ac227ae76088e99b19f560be4eb Mon Sep 17 00:00:00 2001 From: Bruno Torrinha Date: Tue, 6 Feb 2018 23:31:21 +0000 Subject: [PATCH] Fix query unseeding --- .../database/unseeds/BreadTemplatesDataRowsTableUnseeder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/publishable/database/unseeds/BreadTemplatesDataRowsTableUnseeder.php b/publishable/database/unseeds/BreadTemplatesDataRowsTableUnseeder.php index b5a6d9a..5037e0f 100644 --- a/publishable/database/unseeds/BreadTemplatesDataRowsTableUnseeder.php +++ b/publishable/database/unseeds/BreadTemplatesDataRowsTableUnseeder.php @@ -13,7 +13,8 @@ class BreadTemplatesDataRowsTableUnseeder extends Seeder public function run() { // fetch all rows where JSON not empty - $rows = DataRow::whereNot('details', ''); + $rows = DataRow::where('details', '<>', '')->get(); + // find every record for existence of Template attributes // and delete this key. @@ -22,7 +23,7 @@ public function run() // delete key if found if (isset($details->template)) { - unset($details['template']); + unset($details->template); $row->details = json_encode($details);