Created
June 26, 2021 19:15
-
-
Save minons1/0a454564e62e927b2b242a7903c97df9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlogModel extends Model | |
{ | |
protected $table = 'blog'; | |
protected $primaryKey = 'blog_id'; | |
protected $useAutoIncrement = true; | |
protected $insertID = 0; | |
protected $protectFields = true; | |
protected $allowedFields = ['blog_id','blog_title', 'blog_description']; | |
// Dates | |
protected $useTimestamps = true; | |
protected $dateFormat = 'datetime'; | |
protected $createdField = 'created_at'; | |
protected $updatedField = 'updated_at'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment