Commit 09863d0d authored by Shakarim Sapa's avatar Shakarim Sapa

- Fix

parent 3476317f
...@@ -74,8 +74,7 @@ class BlogSchedule extends ActiveRecordModel ...@@ -74,8 +74,7 @@ class BlogSchedule extends ActiveRecordModel
public static function generate($email, $user=null){ public static function generate($email, $user=null){
$date = new \DateTime(); $date = new \DateTime();
// Получили все посты // Получили все посты
$all_posts = Post::find()->orderBy('date DESC')->all(); $all_posts = Post::find()->orderBy('created_at DESC')->all();
var_dump($all_posts); die;
// Создали результирующий массив // Создали результирующий массив
$result_posts = []; $result_posts = [];
// В цикле перебираем все посты в базе // В цикле перебираем все посты в базе
......
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