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);