Commit cc8d40e5 authored by Shakarim Sapa's avatar Shakarim Sapa

- Debugging

parent ed84c92e
...@@ -94,15 +94,15 @@ class BlogSchedule extends ActiveRecordModel ...@@ -94,15 +94,15 @@ class BlogSchedule extends ActiveRecordModel
$result_posts[] = $post->id; $result_posts[] = $post->id;
} }
} }
var_dump($result_posts); die;
// Далее мы уже имеем в распоряжении сформированный массив // Далее мы уже имеем в распоряжении сформированный массив
foreach($result_posts as $post_id) { foreach($result_posts as $post_id) {
$date->modify('+7 days'); $date->modify('+7 days');
$model = new BlogSchedule(); echo $date->format('d.m.Y').'<br>';
$model->email = $email; // $model = new BlogSchedule();
$model->post_id = $post_id; // $model->email = $email;
$model->date = $date->format('Y-m-d'); // $model->post_id = $post_id;
$model->save(); // $model->date = $date->format('Y-m-d');
// $model->save();
} }
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment