本文整理汇总了PHP中Illuminate\Database\Eloquent\Model::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Model::lists方法的具体用法?PHP Model::lists怎么用?PHP Model::lists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Database\Eloquent\Model
的用法示例。
在下文中一共展示了Model::lists方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: supportedCountries
public function supportedCountries()
{
return $this->model->lists('iso_code');
}
示例2: lists
/**
* Retrieve data of modal, as key value.
*
* @param null $limit
* @param array $columns
*
* @return mixed
*/
public function lists($val, $key = null)
{
$results = $this->model->lists($val, $key);
$this->resetModel();
return $results;
}
示例3: listsFields
/**
* Lists the field by the key and value
* @param string $key
* @param string $value
*/
public function listsFields($key, $value)
{
return $this->model->lists($value, $key);
}
示例4: getList
/**
* @param string|int $value
* @param string $key
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getList($value, $key = 'id')
{
return $this->model->lists($value, $key);
}
示例5: listed
/**
* @param string $a
* @param string $b
*
* @return mixed
*/
public function listed($a, $b)
{
return $this->model->lists($a, $b);
}
示例6: lists
public function lists($label, $key = null)
{
$ret = ['' => 'Pilih Provinisi'];
$ret += parent::lists('label', 'id')->toArray();
return $ret;
}
示例7: lists
public function lists($title, $key)
{
$o[] = "--Pilih salah satu--";
return array_merge_recursive($o, parent::lists($title, $key)->toArray());
}
示例8: lists
public function lists($title, $key)
{
$o[0] = "--Pilih salah satu--";
return $o + parent::lists($title, $key)->toArray();
}
示例9: getList
public function getList($column)
{
return $this->model->lists($column, 'id');
}
示例10: lists
/**
* Retrieve data array for populate field select
*
* @param string $column
* @param string|null $key
*
* @return \Illuminate\Support\Collection|array
*/
public function lists($column, $key = null)
{
$this->applyCriteria();
return $this->model->lists($column, $key);
}
示例11: edit
public function edit($id)
{
$user = $this->userModel->findOrFail($id);
$rolesList = $this->roleModel->lists('name', 'id');
return view('adminPanel::user.edit', compact('user', 'rolesList'));
}
示例12: getAllList
public function getAllList($textKey)
{
return $this->model->lists($textKey, 'id');
}
示例13: getAssocLocales
/**
* Get assoc locales .
*
* @param $key
* @param $value
* @return mixed
*/
public function getAssocLocales($key, $value)
{
return $this->source->lists($key, $value);
}