-
Notifications
You must be signed in to change notification settings - Fork 2
6.2 Registering Model
Taufik Firmansyah edited this page Jul 15, 2015
·
2 revisions
Sometime you need to create model for used a cross controller and view . Ofcourse , you can use more than one table inside model
<?php
class Mymodel extends SB_Model{
}
<?php
class Mymodel extends SB_Model{
static function myFirstFunction()
{
return 'hai this is my first function';
}
}
Once method/funtion created inside class model , this will available a cross controller and views
Calling your model function inside controller
$this->load->model('Mymodel');
$this->model = $this->Mymodel;
$row = $this->model->myFirstFunction;
//this will return
'hai this is my first function'
Calling your model function inside controller
<?php echo $this->model->myFirstFunction() ?>
//this will return
'hai this is my first function'
####Getting Started
- Installation
- Create Your First Module
- How to Edit Modules
- Module SQL
- Module Grid Table
- Module Form
- How to change template content element ( Frontend )
####Setting Application
- Manage Basic Info
- Manage Email Template
- Manage Social Login Security
- Manage Translation
- Manage Users and Groups
- Blast Emails
- Audit Trails / Log Activities
- Create New Page
- Working with PHP and MySQL on static page
- How to make multilanguage Page
- Display grid to frontend