當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Client::select方法代碼示例

本文整理匯總了PHP中app\models\Client::select方法的典型用法代碼示例。如果您正苦於以下問題:PHP Client::select方法的具體用法?PHP Client::select怎麽用?PHP Client::select使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\models\Client的用法示例。


在下文中一共展示了Client::select方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getClients

 public function getClients($id)
 {
     $vendedor = Vendedor::find($id);
     $client = Client::select('name', 'telephone')->with('vendedor')->where('vendedor_id', '=', $id)->get();
     //dd($clients->toArray());
     return view("vendedores.clients")->with(array('vendedor' => $vendedor, 'client' => $client));
     return redirect()->back();
 }
開發者ID:Berenes,項目名稱:INPQprueba,代碼行數:8,代碼來源:VendedoresController.php

示例2: clientData

 public function clientData($id)
 {
     $clients = Client::select(['id', 'name', 'company_name', 'primary_number', 'email'])->where('fk_user_id', $id);
     return Datatables::of($clients)->addColumn('clientlink', function ($clients) {
         return '<a href="' . route('clients.show', $clients->id) . '">' . $clients->name . '</a>';
     })->editColumn('created_at', function ($clients) {
         return $clients->created_at ? with(new Carbon($clients->created_at))->format('d/m/Y') : '';
     })->editColumn('deadline', function ($clients) {
         return $clients->created_at ? with(new Carbon($clients->created_at))->format('d/m/Y') : '';
     })->make(true);
 }
開發者ID:Bottelet,項目名稱:Flarepoint-crm,代碼行數:11,代碼來源:UsersController.php

示例3: anyData

    public function anyData()
    {
        $clients = Client::select(['id', 'name', 'company_name', 'email', 'primary_number']);
        return Datatables::of($clients)->addColumn('namelink', function ($clients) {
            return '<a href="clients/' . $clients->id . '" ">' . $clients->name . '</a>';
        })->add_column('edit', '
                <a href="{{ route(\'clients.edit\', $id) }}" class="btn btn-success" >Edit</a>')->add_column('delete', '
                <form action="{{ route(\'clients.destroy\', $id) }}" method="POST">
            <input type="hidden" name="_method" value="DELETE">
            <input type="submit" name="submit" value="Delete" class="btn btn-danger" onClick="return confirm(\'Are you sure?\')"">

            {{csrf_field()}}
            </form>')->make(true);
    }
開發者ID:bottelet,項目名稱:flarepoint,代碼行數:14,代碼來源:ClientsController.php

示例4: postDetail

 public function postDetail()
 {
     $return['success'] = 0;
     if (Input::has('id')) {
         $client = Client::select('name', 'logo', 'created_at as cdate')->find(Input::get('id'));
         if ($client !== null) {
             $return['success'] = 1;
             $data['name'] = $client->name;
             $data['logo'] = $client->logo;
             $data['created_at'] = $client->cdate;
             $return['data'] = $data;
         }
     }
     echo json_encode($return);
 }
開發者ID:benhanks040888,項目名稱:rmyrfl,代碼行數:15,代碼來源:ClientController.php


注:本文中的app\models\Client::select方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。