本文整理汇总了PHP中Datatable::table方法的典型用法代码示例。如果您正苦于以下问题:PHP Datatable::table方法的具体用法?PHP Datatable::table怎么用?PHP Datatable::table使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Datatable
的用法示例。
在下文中一共展示了Datatable::table方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
public function show()
{
//
$useradmin = UserDetails::where('employee_id', Auth::user()->employee_id)->first();
$table = Datatable::table()->addColumn('EmployeeID', 'Fullname', 'Department', 'Email', 'Action')->setUrl(route('alluser'))->noScript();
return View::make('admindashboard.viewusers')->with('table', $table)->with('admin', $useradmin)->with('title', 'All Users');
}
示例2: smarty_block_datatable
/**
* @param array $params
* @param string $content
* @param Smarty_Internal_Template $smarty
* @param boolean $repeat
*
* @throws SmartyException
* @return string
*
* @author Kovács Vince
*/
function smarty_block_datatable($params, $content, Smarty_Internal_Template &$smarty, &$repeat)
{
if (!class_exists('Datatable')) {
throw new SmartyException('chumper/datatable not installed');
}
if ($repeat) {
$options = array('language' => \Lang::get('datatable', array()), 'processing' => true, 'bProcessing' => true, 'stateSave' => true, 'autoWidth' => false, 'columns' => array());
$table = Datatable::table();
if (isset($params['id'])) {
$table->setId($params['id']);
unset($params['id']);
}
if (isset($params['url'])) {
$table->setUrl($params['url']);
unset($params['url']);
} elseif (isset($params['action'])) {
$table->setUrl(URL::action($params['action']));
unset($params['action']);
}
if (isset($params['searching'])) {
$options['searching'] = $params['searching'];
}
if (isset($params['lengthChange'])) {
$options['lengthChange'] = $params['lengthChange'];
}
if (isset($params['class'])) {
$table->setClass($params['class']);
}
$table->setOptions($options);
$smarty->append('datatables', $table);
} else {
$tables = $smarty->getVariable('datatables')->value;
$table = array_pop($tables);
$smarty->assign('datatables', $tables);
if (isset($params['view'])) {
return $table->render($params['view']);
}
return $table->render('datatable');
}
return '';
}
示例3: dkk_pegawai
public function dkk_pegawai()
{
$tabel = Datatable::table()->addColumn('Nama Pegawai', 'NIP', 'Jabatan', 'Unit Kerja', 'Action')->setUrl(route('get-pegawai'))->setClass('table datatable')->noScript();
$m['unit'] = DB::table('pkm_puskesmas')->where('id', '<', 63)->get();
return View::make('dkk_pegawai', compact('tabel'), compact('m'));
}
示例4: dkk_unit
public function dkk_unit()
{
$tabel = Datatable::table()->addColumn('Kode Unit', 'Nama Unit/Ruangan', 'Action')->setUrl(route('get-unit'))->setClass('table datatable')->noScript();
return View::make('dkk_unit', compact('tabel'));
}
示例5: array
@extends('admin.layouts.app')
<?php
$table = Datatable::table()->addColumn('id', 'Name', 'Created at', 'Updated at', 'Actions')->setOptions(array('sDom' => "<'row' <'col-md-12'>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", 'tableTools' => array('sSwfPath' => asset('admin/global/plugins/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf'))))->setUrl(route('api.users'));
// this is the route where data will be retrieved
?>
@include('admin.partials._datatables')
示例6: users
public function users()
{
$table = Datatable::table()->addColumn('username', 'roles', 'View')->setUrl(route('api.users'))->noScript();
$this->layout->content = View::make('database', array('table' => $table));
}
示例7: alokasi_barang
public function alokasi_barang()
{
$m = array();
$tabel = Datatable::table()->addColumn('Nomor', 'Tanggal', 'Unit Alokasi', 'Action')->setUrl(route('get-pkm-alo'))->setOptions(array('order' => array(array(0, 'desc'))))->setClass('table datatable')->noScript();
$m['inventori'] = DB::table('pkm_inventori')->get();
$maks = DB::table('pkm_alokasi')->max('nomor');
if ($maks == '') {
$m['baru'] = 'ALO-' . date('ym') . sprintf("%04d", 1);
} else {
$m['baru'] = substr($maks, 0, 8) . sprintf("%04d", substr($maks, 8) + 1);
}
$m['unit'] = DB::table('pkm_unit')->get();
return View::make('pkm_alokasi', compact('tabel'), compact('m'));
}
示例8: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$table = Datatable::table()->addColumn('first_name', 'last_login', 'id')->setOptions('aoColumnDefs', array(array('bVisible' => 'Name', 'aTargets' => [0]), array('bVisible' => false, 'aTargets' => [1]), array('bVisible' => false, 'aTargets' => [2])))->setUrl(route('api.users'))->noScript();
return View::make('percobaan', array('table' => $table));
}