本文整理匯總了PHP中Zone::where方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zone::where方法的具體用法?PHP Zone::where怎麽用?PHP Zone::where使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zone
的用法示例。
在下文中一共展示了Zone::where方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct($model = null)
{
$this->name = "pda eShop";
$this->owner = "pda";
$this->country = Country::whereName("Greece")->first();
if ($this->country != null) {
$this->zone = Zone::where('country_id', $this->country->id)->where('name', 'Attica')->first();
}
}
示例2: setCode
public function setCode($code)
{
if (is_null($code)) {
$this->fv_error_message = $this->fv_error_message . '<br>- Código' . ERROR_NULL;
return;
}
$codeZ = Zone::where('reg_code', $code)->select('reg_code')->first();
if (!empty($codeZ->reg_code)) {
$this->fv_error_message = $this->fv_error_message . '<br>- Código ' . ERROR_DUPLICADO;
return;
}
$this->reg_code = $code;
return $this;
}
示例3: show
public function show($id)
{
$zones = Zone::where('id', $id)->first();
return View::make('zonas.show', array('zone' => $zones));
}