Blog and Pages are now database driven, woo!
This commit is contained in:
parent
34fe54c20c
commit
1f1cf3b71b
20 changed files with 137 additions and 24 deletions
|
@ -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',
|
||||
];
|
||||
|
||||
|
|
Reference in a new issue