Пример #1
0
 public function random()
 {
     $model = new \App\Model\Post();
     $begin = rand($model->min('id'), $model->max('id') - 25);
     $posts = $model->where('id', '>', $begin)->paginate(25);
     return view('post/list')->with('posts', $posts)->with('type', ['name' => 'random', 'title' => "随机"]);
 }