本文整理汇总了PHP中Driver::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Driver::find方法的具体用法?PHP Driver::find怎么用?PHP Driver::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Driver
的用法示例。
在下文中一共展示了Driver::find方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDriver
public function getDriver($id)
{
$driver = Driver::find($id);
if ($driver == null) {
return Error::make("No Driver Found");
} else {
return Error::success("Driver found", $driver->toArray());
}
}
示例2: update
private function update($tabla)
{
switch ($tabla) {
case 'Service':
$service = Service::update($service_id, array('driver_id' => $driver_id, 'status_id' => "2", 'car_id' => $driver_tmp->car_id));
$this->servicio = Service::find($this->servicio_id);
$this->validar($service);
break;
case 'Driver':
$driver = Driver::update($this->driver_id, array("available" => "0"));
$this->conductor = Driver::find($this->conductor_id);
$this->validar($driver);
break;
}
}
示例3: deleteDriver
public function deleteDriver()
{
$driverId = Input::get('driver_id');
try {
$driver = Driver::find($driverId);
$userId = $driver->user_id;
$driver->delete();
$user = Users::find($userId)->delete();
$results = array('success' => true, 'message' => 'deletion requested');
} catch (Exception $ex) {
\Log::error(__METHOD__ . ' | error :' . print_r($ex, 1));
$results = array('success' => false, 'message' => 'an error occurred');
}
return $results;
}
示例4: get_delete
public function get_delete($id = false)
{
if (!$id) {
return Redirect::to('drivers');
}
$driver = Driver::find($id);
$driver->delete();
return Redirect::to('drivers');
}
示例5:
</tr>
</thead>
<tbody>
<?php
$no = 1;
?>
@foreach($listanakasuh as $fleet)
<?php
$infokso = Kso::where('fleet_id', '=', $fleet->fleet_id)->where('actived', '=', 1)->first();
?>
@if($infokso)
<?php
$bravo = Driver::find($infokso->bravo_driver_id);
?>
<?php
$charlie = Driver::find($infokso->charlie_driver_id);
?>
<tr>
<td>{{ $no }}</td>
<td><span class="label label-success"> <?php
$fl = Fleet::find($fleet->fleet_id);
?>
@if($fl)
{{ $fl->taxi_number }}
@endif </span></td>
<td>( {{$bravo->nip}} ) {{$bravo->name}} </td>
<td>@if($charlie)
( {{$charlie->nip}} ) {{$charlie->name}} </td>
@else
Tidak Ada Charlie
示例6:
border-bottom:0.3mm solid #000;
padding-right: 5mm;
}
h3 {
font-size: 13pt;
}
</style>
</head>
<body>
<div id="content">
<?php
$driver = Driver::find($bap->driver_id);
$fleet = Fleet::find($bap->fleet_id);
?>
<table width="100%" cellpadding="0" cellspacing="0" id="header">
<tr>
<td rowspan="3">{{ HTML::image('img/diantaksi.png','',array('id' => 'logo')) }}</td>
<td>PT DHARMA INDAH AGUNG METROPOLITAN</td>
</tr>
<tr>
<td><strong><u><h3>BERITA ACARA PROSES PENGEMUDI</h3></u></strong></td>
</tr>
<tr>
<td> NO : {{ $bap->bap_number }} </td>
</tr>
</table>
示例7: array
</li>
-->
<ul id="topMain" class="nav nav-pills nav-main">
<li><!-- HOME -->
<a href="{{URL::Route('home')}}">
HOME
</a>
</li>
@if(Auth::check())
<?php
$data = array("first_name" => "User");
$id = Auth::user()->id;
switch (Auth::user()->type) {
case 'driver':
$data = Driver::find($id)->toArray();
break;
case 'customer':
$data = Customer::find($id)->toArray();
break;
case 'business':
$data = Business::find($id)->toArray();
break;
}
?>
<li><!-- HOME -->
<a href="{{URL::Route('edit')}}">
Edit
</a>
</li>
示例8: post_exppemakaianunit
public function post_exppemakaianunit()
{
$input = Input::all();
$wolist = DB::table('wo_listparts')->where('month', '=', date('n', strtotime($input['date'])))->where('year', '=', date('Y', strtotime($input['date'])))->where('kso_id', '=', $input['kso_id'])->order_by('inserted_date_set', 'asc')->get();
$kso = Kso::find($input['kso_id']);
if ($wolist && $kso) {
$objPHPExcel = new PHPExcel();
$objReader = PHPExcel_IOFactory::createReader('Excel5');
$objPHPExcel = $objReader->load(path('public') . 'template/rekapbonpengemuditemplate.xls');
$no = 1;
$startline = 11;
$objPHPExcel->getActiveSheet()->setCellValue('A4', 'PERIODE ' . Myfungsi::periode(strtotime($input['date'])));
$objPHPExcel->getActiveSheet()->setCellValue('B6', Fleet::find($kso->fleet_id)->taxi_number);
$objPHPExcel->getActiveSheet()->setCellValue('B7', Driver::find($kso->bravo_driver_id)->nip);
$objPHPExcel->getActiveSheet()->setCellValue('B8', Driver::find($kso->bravo_driver_id)->name);
foreach ($wolist as $bon) {
$row = $startline + 2;
$objPHPExcel->getActiveSheet()->insertNewRowBefore($row - 1, 1);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $row, $no++);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $row, $bon->inserted_date_set);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $row, $bon->wo_number);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $row, $bon->part_number);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $row, $bon->name_sparepart);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $row, $bon->qty);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $row, $bon->satuan);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $row, $bon->price);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $row, '=F' . $row . '*H' . $row);
}
$objPHPExcel->getActiveSheet()->removeRow($row - 1, 1);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(path('public') . 'Laporan-hutang-armada.xls');
return Response::download(path('public') . 'Laporan-hutang-armada.xls');
}
}
示例9: date
<th>Shift</th>
<th>Status OPS</th>
<th>Action</th>
</tr>
</thead>
<?php
$no = 1;
?>
<tbody>
@foreach($checkout as $out)
<?php
$fleet = Fleet::find($out->fleet_id);
?>
<?php
$driver = Driver::find($out->driver_id);
?>
<tr>
<td>{{ $no }}</td>
<td>@if($fleet) {{ $fleet->taxi_number }} @endif</td>
<td>@if($driver) {{ $driver->nip }} @endif</td>
<td>@if($driver) {{ $driver->name }} @endif</td>
<td>{{ $out->printspj_time }}</td>
<td>{{ $out->checkout_time }}</td>
<td>
<?php
$last_operasi = date('Y-m-d', strtotime($out->operasi_time . ' -1 days'));
$last_checkin = Checkin::where_fleet_id($out->fleet_id)->where_operasi_time($last_operasi)->first();
if ($last_checkin) {
echo $last_checkin->km_fleet;
}
示例10: get_findbyidCheckins
public function get_findbyidCheckins($id = false)
{
if (!$id) {
return false;
}
$checkin = Checkin::find($id);
$fleetinfo = Fleet::find($checkin->fleet_id);
$driverinfo = Driver::find($checkin->driver_id);
if ($checkin) {
$checkin_documents = Checkindocument::where_checkin_id($checkin->id)->first();
$cpy = Checkinphysic::where_checkin_id($checkin->id)->first();
$sp_pyss = array();
if ($cpy) {
$sp_pys = explode(',', $cpy->sparepart_id);
$ket_pys = explode(',', $cpy->ket);
foreach ($sp_pys as $k => $v) {
$sp_pyss[$v] = $ket_pys[$k];
}
}
$std_doc = explode(',', $checkin_documents->std_document_id);
$ket_doc = explode(',', $checkin_documents->ket);
$std_equip = explode(',', $checkin_documents->std_equip_id);
$std_neat = explode(',', $checkin_documents->std_neats_id);
$std_docs = array();
$std_equips = array();
$std_neats = array();
foreach ($std_doc as $k => $v) {
$std_docs[$v] = $ket_doc[$k];
}
foreach ($std_equip as $k => $v) {
$std_equips[$v] = $v;
}
foreach ($std_neat as $k => $v) {
$std_neats[$v] = $v;
}
$returndata = array('id' => $checkin->id, 'nip' => $driverinfo->nip, 'name' => $driverinfo->name, 'taxi_number' => $fleetinfo->taxi_number, 'police_number' => $fleetinfo->police_number, 'pool_id' => $checkin->pool_id, 'pool' => Pool::find($checkin->pool_id)->pool_name, 'status' => Checkinstep::find($checkin->checkin_step_id)->checkin_step, 'km_fleet' => $checkin->km_fleet, 'rit' => $checkin->rit, 'incomekm' => $checkin->incomekm, 'checkin_time' => $checkin->checkin_time, 'std_doc_id' => $std_docs, 'std_equip_id' => $std_equips, 'std_neat_id' => $std_neats, 'psy_check' => $sp_pyss, 'checkin' => true, 'checkinid' => $checkin->id, 'operasi_status_id' => $checkin->operasi_status_id, 'fg_bengkel' => $fleetinfo->fg_bengkel);
} else {
$returndata = array('id' => $checkin->id, 'nip' => $driverinfo->nip, 'name' => $driverinfo->name, 'taxi_number' => $fleetinfo->taxi_number, 'police_number' => $fleetinfo->police_number, 'pool_id' => $checkin->pool_id, 'pool' => Pool::find($checkin->pool_id)->pool_name, 'status' => Checkinstep::find(1)->checkin_step, 'checkin' => false);
}
return json_encode($returndata);
}
示例11:
<td>Tanggal KSO </td>
<td>Mulai Beroperasi </td>
<td>Selesai Beroperasi </td>
<td>Status</td>
<td>Options</td>
</tr>
<?php
$no = 0;
?>
@foreach($fleetkso as $fkso)
<?php
$no++;
?>
<?php
$bravo = Driver::find($fkso->bravo_driver_id);
$charlie = Driver::find($fkso->charlie_driver_id);
?>
<tr>
<td>{{$no}}</td>
<td>{{ $fkso->kso_number }}</td>
<td>
@if($bravo)
{{ '('. $bravo->nip .') '. $bravo->name }}
@endif
@if($charlie)
{{ '('. $charlie->nip .') '. $charlie->name }}
@endif
</td>
<td>{{ $fkso->last_update }}</td>
<td>{{ Myfungsi::fulldate(strtotime($fkso->ops_start)) }}</td>
示例12: foreach
foreach ($a as $aa) {
//echo 'Tanggal '. $aa->date .' di bawa pengemudi ' . $aa->driver_id ;
//echo '<br>';
array_push($free, $aa->date);
}
// DISPLY PENGEMUDI
echo '<tr>';
echo '<td>';
//echo 'Driv ' . $value ;
$kso = Kso::where_bravo_driver_id($value)->where_actived(1)->first();
if ($kso) {
echo Fleet::find($kso->fleet_id)->taxi_number;
}
echo '</td>';
echo '<td>';
echo Driver::find($value)->name;
echo '</td>';
$holiday = array();
for ($i = 1; $i <= date('t', $timestamp); $i++) {
if (is_array($free) && !empty($free)) {
if (!in_array($i, $free)) {
echo '<td style="background-color: #fcf8e3">';
// Set Libur symbol
echo ' L ';
array_push($holiday, $i);
} else {
echo '<td style="background-color: #dff0d8">';
}
}
echo '</td>';
}
示例13: edit_pic_api
public function edit_pic_api($id)
{
$user = User::find($id);
if (is_null($user)) {
return Error::make("Invalid User");
}
if ($user->type != "driver") {
return Error::make("User is not Driver");
}
$this->edit_pic_helper($user);
$data = Driver::find($id)->toArray();
return Error::success("Successfully Uploaded pictures", $data);
}
示例14:
<td rowspan="2">Denda</td>
<td colspan="4">Pembayaran</td>
<td rowspan="2">KS</td>
<td rowspan="2">Ket. OPS</td>
</tr>
<tr>
<td>KS</td>
<td>SP</td>
<td>DP KSO</td>
<td>DP SP</td>
</tr>
</thead>
<tbody>
@foreach($reports as $report)
<?php
$driver = Driver::find($report->driver_id);
?>
<tr>
<td>{{ $report->operasi_time }}</td>
<td>'{{ $driver->nip }}</td>
<td>{{ $driver->name }}</td>
<td class="text-right">{{ number_format($report->setoran_cash, 2, ',', '.') }}</td>
<td class="text-right">{{ number_format($report->denda, 2, ',', '.') }}</td>
<td class="text-right">{{ number_format($report->cicilan_ks, 2, ',', '.') }}</td>
<td class="text-right">{{ number_format($report->cicilan_sparepart, 2, ',', '.') }}</td>
<td class="text-right">{{ number_format($report->cicilan_dp_kso, 2, ',', '.') }}</td>
<td class="text-right">{{ number_format($report->hutang_dp_sparepart, 2, ',', '.') }}</td>
<td class="text-right">{{ number_format($report->ks, 2, ',', '.') }}</td>
<td class="text-right">{{ Statusoperasi::find($report->operasi_status_id)->kode }}</td>
</tr>
<?php
示例15: get_downloadreportbs
public function get_downloadreportbs($date = false)
{
if (!$date) {
$date = date('Y-m-d');
}
$ksos = Kso::where('pool_id', '=', Auth::user()->pool_id)->where('actived', '=', 1)->get();
$ksoaktif = array();
foreach ($ksos as $xkso) {
$ksoaktif[] = $xkso->id;
}
$financials = DB::table('financial_report_monthly_bykso')->where('month', '=', date('n', strtotime($date)))->where('year', '=', date('Y', strtotime($date)))->where_pool_id(Auth::user()->pool_id)->where_in('kso_id', $ksoaktif)->order_by('taxi_number', 'asc')->get();
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator(Auth::user()->fullname)->setLastModifiedBy(Auth::user()->fullname)->setTitle("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setSubject("Laporan Harian " . Pool::find(Auth::user()->pool_id)->pool_name . '-' . date('Y-m-d'))->setDescription("Laporan harian operasi pool")->setKeywords("Laporan Harian")->setCategory("");
$objPHPExcel->createSheet(NULL, 0);
$objPHPExcel->setActiveSheetIndex(0);
//$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false);
//$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false);
$objPHPExcel->getActiveSheet()->mergeCells('A5:A6');
$objPHPExcel->getActiveSheet()->mergeCells('B5:B6');
$objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
$objPHPExcel->getActiveSheet()->mergeCells('E5:E6');
$objPHPExcel->getActiveSheet()->mergeCells('F5:G5');
$objPHPExcel->getActiveSheet()->mergeCells('H5:H6');
$objPHPExcel->getActiveSheet()->mergeCells('I5:I6');
$objPHPExcel->getActiveSheet()->mergeCells('J5:J6');
$objPHPExcel->getActiveSheet()->mergeCells('K5:K6');
$objPHPExcel->getActiveSheet()->mergeCells('L5:O5');
$objPHPExcel->getActiveSheet()->mergeCells('P5:R5');
//$objPHPExcel->getActiveSheet()->mergeCells('R5:R6');
$objPHPExcel->getActiveSheet()->mergeCells('S5:S6');
$objPHPExcel->getActiveSheet()->mergeCells('T5:T6');
$objPHPExcel->getActiveSheet()->mergeCells('U5:U6');
$objPHPExcel->getActiveSheet()->mergeCells('V5:V6');
$objPHPExcel->getActiveSheet()->mergeCells('W5:W6');
$objPHPExcel->getActiveSheet()->mergeCells('X5:X6');
$objPHPExcel->getActiveSheet()->setCellValue('A5', 'NO');
$objPHPExcel->getActiveSheet()->setCellValue('B5', 'BAPAK ASUH');
$objPHPExcel->getActiveSheet()->setCellValue('C5', 'PENGEMUDI');
$objPHPExcel->getActiveSheet()->setCellValue('C6', 'NIP');
$objPHPExcel->getActiveSheet()->setCellValue('D6', 'NAMA');
$objPHPExcel->getActiveSheet()->setCellValue('E5', 'BODY');
$objPHPExcel->getActiveSheet()->setCellValue('F5', 'STATUS');
$objPHPExcel->getActiveSheet()->setCellValue('F6', 'OPS');
$objPHPExcel->getActiveSheet()->setCellValue('G6', 'BS');
$objPHPExcel->getActiveSheet()->setCellValue('H5', 'SETORAN MURNI');
$objPHPExcel->getActiveSheet()->setCellValue('I5', 'TAB SPAREPART');
$objPHPExcel->getActiveSheet()->setCellValue('J5', 'DENDA JAM');
$objPHPExcel->getActiveSheet()->setCellValue('K5', 'DP SPAREPART');
$objPHPExcel->getActiveSheet()->setCellValue('L5', 'BAYAR CICILAN');
$objPHPExcel->getActiveSheet()->setCellValue('L6', 'KS');
$objPHPExcel->getActiveSheet()->setCellValue('M6', 'S-PART');
$objPHPExcel->getActiveSheet()->setCellValue('N6', 'DP-KSO');
$objPHPExcel->getActiveSheet()->setCellValue('O6', 'HUT-LAMA');
$objPHPExcel->getActiveSheet()->setCellValue('P5', 'BAYAR');
$objPHPExcel->getActiveSheet()->setCellValue('P6', 'STIKER BANDARA & KEAMANAN');
$objPHPExcel->getActiveSheet()->setCellValue('Q6', 'CUCI');
$objPHPExcel->getActiveSheet()->setCellValue('R6', 'LAKA');
$objPHPExcel->getActiveSheet()->setCellValue('S5', 'HARUS SETOR');
$objPHPExcel->getActiveSheet()->setCellValue('T5', 'POTONGAN');
$objPHPExcel->getActiveSheet()->setCellValue('U5', 'SETOR CASH');
$objPHPExcel->getActiveSheet()->setCellValue('V5', 'KETEKORAN');
$objPHPExcel->getActiveSheet()->setCellValue('W5', 'SETORAN OPS');
$objPHPExcel->getActiveSheet()->setCellValue('X5', 'SELISIH');
$no = 1;
$starline = 8;
foreach ($financials as $finan) {
$ks = abs($finan->setoran_cash - ($finan->setoran_wajib + $finan->tabungan_sparepart + $finan->denda + $finan->cicilan_sparepart + $finan->cicilan_ks + $finan->biaya_cuci + $finan->iuran_laka + $finan->cicilan_dp_kso + $finan->cicilan_hutang_lama + $finan->cicilan_lain + $finan->hutang_dp_sparepart - $finan->potongan));
$bs = 'Tidak';
if ($ks <= $finan->cicilan_ks) {
$bs = 'Ya';
}
$bpkasuh = Anakasuh::where('status', '=', 1)->where('fleet_id', '=', $finan->fleet_id)->first();
$bravo = Kso::find($finan->kso_id);
$nip = 'NN';
$bravonama = 'NN';
if ($bravo) {
$oxx = Driver::find($bravo->bravo_driver_id);
if ($oxx) {
$nip = $oxx->nip;
$bravonama = $oxx->name;
}
}
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(0, $starline, $no);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, $starline, $bpkasuh ? User::find($bpkasuh->user_id)->fullname : 'TIDAK ADA BAPAK ASUH');
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(2, $starline, $nip);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(3, $starline, $bravonama);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(4, $starline, $finan->taxi_number);
//$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(5, $starline, $finan->kode);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(6, $starline, $bs);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(7, $starline, $finan->setoran_wajib);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(8, $starline, $finan->tabungan_sparepart);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(9, $starline, $finan->denda);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(10, $starline, $finan->hutang_dp_sparepart);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(11, $starline, $finan->cicilan_ks);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(12, $starline, $finan->cicilan_sparepart);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(13, $starline, $finan->cicilan_dp_kso);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(14, $starline, $finan->cicilan_hutang_lama);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(15, $starline, $finan->cicilan_lain);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(16, $starline, $finan->biaya_cuci);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(17, $starline, $finan->iuran_laka);
//.........这里部分代码省略.........