Blog and Pages are now database driven, woo!

This commit is contained in:
Timothy Rogers 2020-08-01 23:52:45 -04:00
parent 34fe54c20c
commit 1f1cf3b71b
20 changed files with 137 additions and 24 deletions

View file

@ -2,6 +2,7 @@
use App\Models\BlogModel;
use CodeIgniter\Controller;
use CodeIgniter\Services;
class Blog extends Controller
{
@ -11,7 +12,8 @@ class Blog extends Controller
$model = new BlogModel();
$data = [
'blog' => $model->getBlog(),
'blog' => $model->orderBy('id', 'DESC')->paginate(5),
'pager' => $model->pager,
'title' => 'Blog',
];