当前位置: 首页>>代码示例>>PHP>>正文


PHP Customer::GetCustomerAsUser方法代码示例

本文整理汇总了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]);
 }
开发者ID:bychems,项目名称:projet-pfe,代码行数:6,代码来源:CustomersController.php

示例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&eacute;tail">{{ $customer->name }} {{$customer->last_name}}</a></li>
                @endif
              @endforeach
          @endif
        </ul>

开发者ID:bychems,项目名称:projet-pfe,代码行数:29,代码来源:default.blade.php

示例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]);
     }
 }
开发者ID:bychems,项目名称:projet-pfe,代码行数:36,代码来源:TestDrivesController.php


注:本文中的app\Customer::GetCustomerAsUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。