Commit ed84c92e authored by Shakarim Sapa's avatar Shakarim Sapa

- Debugging

parent c39b0ccd
...@@ -75,7 +75,6 @@ class BlogSchedule extends ActiveRecordModel ...@@ -75,7 +75,6 @@ class BlogSchedule extends ActiveRecordModel
$date = new \DateTime(); $date = new \DateTime();
// Получили все посты // Получили все посты
$all_posts = Post::find()->orderBy('created_at DESC')->all(); $all_posts = Post::find()->orderBy('created_at DESC')->all();
var_dump($all_posts); die;
// Создали результирующий массив // Создали результирующий массив
$result_posts = []; $result_posts = [];
// В цикле перебираем все посты в базе // В цикле перебираем все посты в базе
...@@ -95,6 +94,7 @@ class BlogSchedule extends ActiveRecordModel ...@@ -95,6 +94,7 @@ 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');
......
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