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


PHP Client::where方法代码示例

本文整理汇总了PHP中app\models\Client::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::where方法的具体用法?PHP Client::where怎么用?PHP Client::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Client的用法示例。


在下文中一共展示了Client::where方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 /**
  * Update the specified resource in storage.
  *
  * @return \Illuminate\Http\Response
  */
 public function update(ClientRequest $request, $slug)
 {
     $client = Client::where(compact('slug'))->firstOrFail();
     $client_request = $request->except('tabs');
     $client->update($client_request);
     Toastr::success("Saved changes");
     $tabs = explode(':', $request->get('tabs'));
     return redirect('/client/' . $client->slug . '/' . $tabs[0] . '/' . $tabs[1]);
 }
开发者ID:unclefudge,项目名称:whs,代码行数:14,代码来源:ClientController.php

示例2: getclients

 public function getclients()
 {
     $start = Input::get('start', Date::now()->format('date'));
     $end = Input::get('end', Date::now()->format('date'));
     $client = Client::where('clientid', '=', Input::get('Client'))->first();
     $tjobs = Job::select(array('jobid', 'name', 'starttime', 'endtime', 'level', 'jobbytes', 'jobfiles', 'jobstatus'))->where('clientid', '=', $client->clientid)->where('starttime', '>=', $start)->where('endtime', '<=', $end);
     switch (Input::get('type')) {
         case "terminated":
             $tjobs->where('jobstatus', '=', 'T');
             break;
         case "running":
             $tjobs->where('jobstatus', '=', 'R');
             break;
         case "watting":
             $tjobs->wherein('jobstatus', array('c', 'F', 'j', 'M', 'm', 'p', 's', 't'));
             break;
         case "error":
             $tjobs->wherein('jobstatus', array('e', 'f', 'E'));
             break;
         case "cancel":
             $tjobs->where('jobstatus', '=', 'A');
             break;
     }
     return Datatables::of($tjobs)->edit_column('name', '{{ link_to_route("jobs", $name ,array("Job" => $jobid)) }} ')->edit_column('jobid', '{{ link_to_route("jobs", $jobid ,array("Job" => $jobid)) }} ')->make();
 }
开发者ID:acrixl,项目名称:Reportula,代码行数:25,代码来源:ClientsController.php

示例3: postMultiple

 public function postMultiple()
 {
     /*
     |
     | Getting information from user
     |
     */
     $userInfo = array();
     foreach (\Input::all() as $key => $value) {
         $userInfo[$key] = $value;
     }
     //var_dump($userInfo);
     $message = $userInfo['holidayText'];
     $state = $userInfo['state'];
     $spamOrClient = $userInfo['spamOrClient'];
     //echo $message;
     //echo $state;
     //echo $spamClient;
     /*
     |
     | Connecting to the turbosms api via soap connection
     |
     */
     $client = new SoapClient('http://turbosms.in.ua/api/wsdl.html');
     $auth = array('login' => 'bandson', 'password' => '031194vela');
     $result = $client->Auth($auth);
     //echo $result->AuthResult . ' ';
     /*
     |
     | Setting appropriate data
     |
     */
     $ruleMaleClient = ['state' => 'male', 'spamOrClient' => 'client'];
     $ruleMaleSpam = ['state' => 'male', 'spamOrClient' => 'spam'];
     $ruleMaleAll = ['state' => 'male'];
     $ruleFemaleClient = ['state' => 'female', 'spamOrClient' => 'client'];
     $ruleFemaleSpam = ['state' => 'female', 'spamOrClient' => 'spam'];
     $ruleFemaleAll = ['state' => 'female'];
     $ruleAllClient = ['spamOrClient' => 'client'];
     $ruleAllSpam = ['spamOrClient' => 'spam'];
     if ($state == "male") {
         $str = '';
         if ($spamOrClient == "spam") {
             $client = Client::where($ruleMaleSpam)->get();
             //echo $client;
         } else {
             if ($spamOrClient == "client") {
                 $client = Client::where($ruleMaleClient)->get();
                 //echo $client;
             } else {
                 if ($spamOrClient == "spCl") {
                     $client = Client::where($ruleMaleAll)->get();
                     //echo $client;
                 }
             }
         }
         foreach ($client as $row) {
             $str = $str . ',' . $row->mobNum;
         }
         $telephones = substr($str, 1);
         //echo $telephones;
     } else {
         if ($state == "female") {
             $str = '';
             if ($spamOrClient == "spam") {
                 $client = Client::where($ruleFemaleSpam)->get();
                 //echo $client;
             } else {
                 if ($spamOrClient == "client") {
                     $client = Client::where($ruleFemaleClient)->get();
                     //echo $client;
                 } else {
                     if ($spamOrClient == "spCl") {
                         $client = Client::where($ruleFemaleAll)->get();
                         //echo $client;
                     }
                 }
             }
             foreach ($client as $row) {
                 $str = $str . ',' . $row->mobNum;
             }
             $telephones = substr($str, 1);
             //echo $telephones;
         } else {
             if ($state == "all") {
                 $str = '';
                 if ($spamOrClient == "spam") {
                     $client = Client::where($ruleAllSpam)->get();
                     //echo $client;
                 } else {
                     if ($spamOrClient == "client") {
                         $client = Client::where($ruleAllClient)->get();
                         //echo $client;
                     } else {
                         if ($spamOrClient == "spCl") {
                             $client = Client::all();
                             //echo $client;
                         }
                     }
                 }
//.........这里部分代码省略.........
开发者ID:viliguravlad,项目名称:tokarevsg,代码行数:101,代码来源:SendController.php


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