本文整理汇总了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));
}