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


PHP Merchant::where方法代码示例

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


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

示例1: postSynclegacy

 public function postSynclegacy()
 {
     set_time_limit(0);
     $mymerchant = Merchant::where('group_id', 4)->get();
     $count = 0;
     foreach ($mymerchant->toArray() as $m) {
         $member = Member::where('legacyId', $m['id'])->first();
         if ($member) {
         } else {
             $member = new Member();
         }
         foreach ($m as $k => $v) {
             $member->{$k} = $v;
         }
         if (!isset($member->status)) {
             $member->status = 'inactive';
         }
         if (!isset($member->url)) {
             $member->url = '';
         }
         $member->legacyId = new MongoInt32($m['id']);
         $member->roleId = Prefs::getRoleId('Merchant');
         $member->unset('id');
         $member->save();
         $count++;
     }
     return Response::json(array('result' => 'OK', 'count' => $count));
 }
开发者ID:awidarto,项目名称:jexadmin,代码行数:28,代码来源:OrderarchiveController.php

示例2: closedir

                        closedir($dh);
                    }
                }
            }
        }
    }
});
Route::get('pdf', function () {
    $content = "\n    <page>\n        <h1>Exemple d'utilisation</h1>\n        <br>\n        Ceci est un <b>exemple d'utilisation</b>\n        de <a href='http://html2pdf.fr/'>HTML2PDF</a>.<br>\n    </page>";
    $html2pdf = new HTML2PDF();
    $html2pdf->WriteHTML($content);
    $html2pdf->Output('exemple.pdf', 'D');
});
Route::get('smerchant', function () {
    $q = Input::get('term');
    $user = Merchant::where('group_id', 4)->where(function ($query) use($q) {
        $query->where('merchantname', 'like', '%' . $q . '%')->orWhere('fullname', 'like', '%' . $q . '%');
    })->get();
    print_r($user->toArray());
});
/*
Route::get('brochure/dl/{id}',function($id){

    $prop = Property::find($id)->toArray();

    //return View::make('print.brochure')->with('prop',$prop)->render();

    $content = View::make('print.brochure')->with('prop',$prop)->render();

    //return $content;
开发者ID:awidarto,项目名称:jexadmin,代码行数:30,代码来源:routes.php

示例3: getMerchant

 public function getMerchant()
 {
     $q = Input::get('term');
     $user = Merchant::where('group_id', 4)->where(function ($query) use($q) {
         $query->where('merchantname', 'like', '%' . $q . '%')->orWhere('fullname', 'like', '%' . $q . '%');
     })->get();
     $result = array();
     foreach ($user->toArray() as $r) {
         $result[] = array('id' => $r['id'], 'value' => $r['merchantname'], 'email' => $r['email'], 'label' => $r['merchantname'] . ' ( ' . $r['email'] . ' )');
     }
     return Response::json($result);
 }
开发者ID:awidarto,项目名称:jexadmin,代码行数:12,代码来源:AjaxController.php

示例4: merchantObject

 public function merchantObject($merchant_id)
 {
     $merchant = \Merchant::where('id', '=', $merchant_id)->first();
     if ($merchant) {
         $merchant = $merchant->toArray();
         $nm = array();
         foreach ($merchant as $key => $value) {
             if (in_array($key, $this->merchant_unset)) {
             } else {
                 $nk = $this->underscoreToCamelCase($key);
                 $nm[$nk] = is_null($value) ? '' : $value;
             }
         }
         $nm['extId'] = $nm['id'];
         unset($nm['id']);
         return $nm;
     } else {
         return array();
     }
 }
开发者ID:awidarto,项目名称:jexadmin,代码行数:20,代码来源:PickupapiController.php

示例5: getMerchant

 public static function getMerchant($key = null, $val = null, $order = null, $dir = null)
 {
     if (is_null($key)) {
         $c = Merchant::where('group_id', '=', 4)->orderBy('merchantname', 'asc')->get();
         self::$merchant = $c;
         return new self();
     } else {
         $c = Merchant::where($key, '=', $val)->first();
         self::$merchant = $c;
         return $c;
     }
 }
开发者ID:awidarto,项目名称:jexadmin,代码行数:12,代码来源:Prefs.php


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