本文整理汇总了PHP中app\Customer::GetCustomerAsUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::GetCustomerAsUser方法的具体用法?PHP Customer::GetCustomerAsUser怎么用?PHP Customer::GetCustomerAsUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Customer
的用法示例。
在下文中一共展示了Customer::GetCustomerAsUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listcustomers
public function listcustomers()
{
$title = "List des clients";
$customers = Customer::GetCustomerAsUser(Controller::User()->id)->get();
return view('Customers/list-customers', ['title' => $title, 'customers' => $customers]);
}
示例2:
@include ('inc.head')
<body>
@include ('inc.menu')
@yield('banner')
<div class="container">
<div class="row">
<div class="col-md-9 haut">
@yield('content')
</div>
<div class="col-md-3">
<?php
$customers = \App\Customer::GetCustomerAsUser(Auth::user()->id)->get();
?>
<h3>Clients : </h3>
<ul class="client">
@if(isset($customers))
@foreach($customers as $customer)
@if(!empty($customer->name))
<li><a href="{{route('afficheCustomer', $customer->id)}}" title="Détail">{{ $customer->name }} {{$customer->last_name}}</a></li>
@endif
@endforeach
@endif
</ul>
示例3: showCalendar
public function showCalendar($id)
{
$title = 'Calendrier';
$customers = array();
$custs = Customer::GetCustomerAsUser(Controller::User()->id)->get();
foreach ($custs as $c) {
$customers[$c->id] = $c->last_name . " " . $c->name;
}
$dateDispo = TestDriveDay::ListDateDispo($id)->get();
$nondispo = array();
if (!empty($dateDispo[0])) {
$dateBegin = $dateDispo[0]->date_day;
$dateEnd = $dateDispo[count($dateDispo) - 1]->date_day;
$test = $dateBegin;
$i = 0;
foreach ($dateDispo as $d) {
if ($test != $d->date_day) {
while ($test != $d->date_day) {
// echo $d->date_day."!=".$test."-----------";
array_push($nondispo, $test);
$test = strtotime("+1 day", strtotime($test));
$test = date("Y-m-d", $test);
}
$test = strtotime("+1 day", strtotime($test));
$test = date("Y-m-d", $test);
} else {
$test = strtotime("+1 day", strtotime($test));
$test = date("Y-m-d", $test);
}
}
$nondispo = str_replace("-", "/", json_encode($nondispo));
return view('TestDrives/calendar-Test-Drive', ['title' => $title, 'dateDispo' => $dateDispo, 'dateEnd' => $dateEnd, 'dateBegin' => $dateBegin, 'carid' => $id, 'nondispo' => $nondispo, 'customers' => $customers]);
} else {
return view('TestDrives/calendar-Test-Drive', ['title' => $title, 'carid' => $id, 'dateBegin' => "", 'dateEnd' => "", 'nondispo' => "[]", 'customers' => $customers]);
}
}