-
Notifications
You must be signed in to change notification settings - Fork 15
Model
Taufik Firmansyah edited this page Jan 30, 2015
·
3 revisions
Every generated modules has they own model .
<?php
class Employee extends BaseModel {
protected $table = 'yourtable';
protected $primaryKey = 'primarykey';
public function __construct() {
parent::__construct();
}
public static function querySelect( ){
return " SELECT yourtable.* FROM yourtable";
}
public static function queryWhere( ){
return " WHERE yourtable.primarykeyIS NOT NULL ";
}
public static function queryGroup(){
return " ";
}
}
As you can see , they only have 3 function inside model . This is inheriet class , so all parent class are will automate available in this model class .
Please reffer to BaseModel class list .
Module Structure
- [controller] (https://github.com/mangopik/Sximo-Laravel/wiki/Controller)
- Model
- views
BaseController
- [Function getDownload()] (https://github.com/mangopik/Sximo-Laravel/wiki/function-getDownload%28%29)
- Function trackUriSegment()
- [Function getComboselect()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-getComboselect)
- [Function validatePost()] (https://github.com/mangopik/Sximo-Laravel/wiki/function-validatePost)
- [Function validateForm()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-validateForm)
- [Function validAccess()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-ValidAccess)
- [Function inputLogs()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-inputLogs)
- [Function buildSearch()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-buildSearch)
- [Function masterDetailParam()] (#)
BaseModel
- [Function makeInfo()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-makeInfo)
- [Function getRows()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-getRows)
- [Function getRow()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-getRow)
- [Function insetRow()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-insertRow)
SiteHelpers
- [Function avatar()] (#)
- [Function alert()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-alert)
- [Function encryptID()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-encryptID)
- [Function gridDisplay()] (#)
- [Function langOption()] (https://github.com/mangopik/Sximo-Laravel/wiki/Function-langOption)