Rebuilding with CodeIgniter 4

This commit is contained in:
Timothy Rogers 2020-07-27 22:22:06 -04:00
parent e6dcc92267
commit 3bce4ad0ac
92 changed files with 7304 additions and 380 deletions

21
app/Models/BlogModel.php Normal file
View file

@ -0,0 +1,21 @@
<?php namespace App\Models;
use CodeIgniter\Model;
class BlogModel extends Model
{
protected $table = 'blog';
public function getBlog($slug = false)
{
if ($slug === false)
{
return $this->findAll();
}
return $this->asArray()
->where(['slug' => $slug])
->first();
}
}