Last active
November 30, 2016 19:37
-
-
Save jlamim/bea4f7f4e215d255c5688ab72d1a113d to your computer and use it in GitHub Desktop.
Live CodeIgniter 4 - Configurações no Model
This file contains 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
<?php | |
use \CodeIgniter\Database\ConnectionInterface; | |
class UserModel extends \CodeIgniter\Model | |
{ | |
protected $table = 'users'; | |
protected $primaryKey = 'id'; | |
protected $returnType = 'array'; | |
protected $useSoftDeletes = true; | |
protected $allowedFields = ['name', 'email']; | |
protected $useTimestamps = false; | |
protected $validationRules = []; | |
protected $validationMessages = []; | |
protected $skipValidation = false; | |
protected $db; | |
public function __construct(ConnectionInterface &$db) | |
{ | |
$this->db =& $db; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment