本文整理汇总了PHP中Pool::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Pool::all方法的具体用法?PHP Pool::all怎么用?PHP Pool::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pool
的用法示例。
在下文中一共展示了Pool::all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_dataksmurni
public function get_dataksmurni($date = false)
{
if (!$date) {
$date = date('Y-m-d');
}
$month = date('n', strtotime($date));
$year = date('Y', strtotime($date));
$series = array();
$categories = array();
foreach (Pool::all() as $pool) {
$datafianan = array();
for ($j = 1; $j <= date('t', strtotime($date)); $j++) {
$categories[] = $j;
$datafianan[] = 0;
}
$reportdaily = DB::table('financial_report_graf_ks_detail')->where_month($month)->where_year($year)->order_by('operasi_time', 'asc')->where_pool_id($pool->id)->where_in('operasi_status_id', array(1, 3))->where('setoran_cash', '<', 50000000)->group_by('operasi_time')->get(array('operasi_time', DB::raw('sum(ks) as subks')));
$arraydata = array();
foreach ($reportdaily as $finan) {
$potition = date('j', strtotime($finan->operasi_time)) - 1;
$arraydata[$potition] = (int) $finan->subks;
}
$datas = array_replace($datafianan, $arraydata);
$series[] = array('name' => $pool->pool_name, 'data' => $datas);
}
$returndata = array('categories' => $categories, 'series' => $series);
return json_encode($returndata);
}
示例2: get_add
public function get_add()
{
$this->data['pools'] = Koki::to_dropdown(Pool::all(), 'id', 'pool_name', array(0 => 'All'));
$this->data['users'] = Koki::to_dropdown(User::all(), 'id', 'first_name');
$this->data['create'] = true;
return View::make('themes.modul.' . $this->views . '.form', $this->data);
}
示例3: get_datamonthly
public function get_datamonthly($date = false)
{
if (!$date) {
$date = date('Y-m-d');
}
$year = date('Y', strtotime($date));
$series = array();
$categories = array();
foreach (Pool::all() as $pool) {
$datafianan = array();
for ($j = 1; $j <= 12; $j++) {
$categories[] = $j;
$datafianan[] = 0;
}
$reportmonthly = DB::table('financial_report_summary_month_graf')->where_year($year)->order_by('operasi_time', 'asc')->where_pool_id($pool->id)->where('setoran_cash', '<', 993000000)->get();
$arraydata = array();
$bulan = 0;
foreach ($reportmonthly as $finan) {
$potition = $finan->month;
$arraydata[$potition] = (int) ($finan->setoran_cash - ($finan->biaya_cuci + $finan->iuran_laka));
}
$datas = array_replace($datafianan, $arraydata);
$series[] = array('name' => $pool->pool_name, 'data' => $datas);
}
$returndata = array('categories' => $categories, 'series' => $series);
return json_encode($returndata);
}
示例4: get_edit
public function get_edit($id = false)
{
if (!$id) {
return Redirect::to('fleets');
}
$brands = array();
$models = array();
$pools = array();
foreach (Fleetbrand::all() as $brand) {
$brands[$brand->id] = $brand->fleet_brand;
}
foreach (Fleetmodel::all() as $model) {
$models[$model->id] = $model->fleet_model;
}
foreach (Pool::all() as $pool) {
$pools[$pool->id] = $pool->pool_name;
}
$this->data['brands'] = $brands;
$this->data['models'] = $models;
$this->data['pools'] = $pools;
$this->data['create'] = false;
$this->data['fleet'] = Fleet::find($id);
return View::make('themes.modul.' . $this->views . '.form', $this->data);
}
示例5: get_create
/**
* Our user article create function
*
**/
public function get_create()
{
$this->data['create'] = true;
$this->data['roles'] = Role::all();
$opt = array();
foreach (Pool::all() as $po) {
$opt[$po->id] = $po->pool_name;
}
$this->data['pools'] = $opt;
return View::make('themes.modul.' . $this->views . '.form', $this->data);
}
示例6: get_editkso
public function get_editkso($id = false)
{
if (!$id) {
Redirect::to('ksos');
}
$kso = Kso::find($id);
$optionspool = array();
foreach (Pool::all() as $pool) {
$optionspool[$pool->id] = $pool->pool_name;
}
$opttipe = array();
foreach (Ksotype::all() as $tipe) {
$opttipe[$tipe->id] = $tipe->type;
}
$optionFleet = array();
$optionFleet['null'] = '----';
//$fleets = Fleet::where_pool_id($kso->pool_id)->order_by('taxi_number','asc')->get(array('id','taxi_number'));
$fleets = Fleet::order_by('taxi_number', 'asc')->get(array('id', 'taxi_number'));
if ($fleets) {
foreach ($fleets as $fo) {
$optionFleet[$fo->id] = $fo->taxi_number;
}
}
$optionDriver = array();
$optionDriver['null'] = '----';
//$drivers = Driver::where_pool_id($kso->pool_id)->order_by('nip', 'asc')->get(array('id','nip','name'));
$drivers = Driver::order_by('nip', 'asc')->get(array('id', 'nip', 'name'));
if ($drivers) {
foreach ($drivers as $do) {
$optionDriver[$do->id] = $do->nip . ' - ' . $do->name;
}
}
$this->data['statuskso'] = array('1' => 'Active', '2' => 'Gugur KSO', '3' => 'Selesai KSO');
$this->data['pools'] = $optionspool;
$this->data['kso_types'] = $opttipe;
$this->data['datakso'] = $kso;
$this->data['fleets'] = $optionFleet;
$this->data['drivers'] = $optionDriver;
return View::make('themes.modul.' . $this->views . '.formeditkso', $this->data);
}
示例7: get_edit
public function get_edit($id = false)
{
if (!$id) {
return Redirect::to('drivers');
}
$cities = array();
$pools = array();
foreach (City::all() as $city) {
$cities[$city->id] = $city->city;
}
foreach (Pool::all() as $pool) {
$pools[$pool->id] = $pool->pool_name;
}
$this->data['cities'] = $cities;
$this->data['pools'] = $pools;
$this->data['driver'] = Driver::find($id);
$this->data['create'] = false;
$this->data['driver_id'] = $id;
return View::make('themes.modul.' . $this->views . '.form', $this->data);
}