Instantly share code, notes, and snippets.
syaiful-scooter
/ sample-menu-view.php
Created
March 14, 2020 14:26
— forked from teknosains/sample-menu-view.php
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
<h3>List Menu</h3> | |
<span class="loading"></span> | |
<div id="menu"> | |
<!--menu di render disini--> | |
</div> | |
<button type="button" id="logout">Logout</button> | |
<script src="<?php echo base_url('assets/js/jquery-3.4.1.min.js'); ?>"></script> |
syaiful-scooter
/ menu-sample-model.php
Created
March 14, 2020 14:25
— forked from teknosains/menu-sample-model.php
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 | |
class Menu_model extends CI_Model | |
{ | |
public function fetchMenu($parent_id) { | |
return $this->db->select('*') | |
->from('menu') | |
->where('parent_id', $parent_id) | |
->get()->result_array(); | |
} |
syaiful-scooter
/ sample-menu-generator.php
Created
March 14, 2020 14:25
— forked from teknosains/sample-menu-generator.php
sample-menu-generator
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 | |
class Menu extends CI_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
$this->load->model('Menu_model'); | |
} |