first commit
This commit is contained in:
18
application/models/Authitem_model.php
Normal file
18
application/models/Authitem_model.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php defined('BASEPATH') OR exit ('No direct script access allowed!');
|
||||
|
||||
class Authitem_model extends CI_Model
|
||||
{
|
||||
private $_table = "auth_item";
|
||||
public $name, $type, $created_at, $updated_at;
|
||||
|
||||
public function create_role($slug)
|
||||
{
|
||||
$date = new DateTime();
|
||||
|
||||
$this->name = $slug;
|
||||
$this->type = 1;
|
||||
$this->created_at = $date->getTimestamp();
|
||||
$this->updated_at = $date->getTimestamp();
|
||||
$this->db->insert($this->_table, $this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user