本文整理汇总了PHP中Setting::lists方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::lists方法的具体用法?PHP Setting::lists怎么用?PHP Setting::lists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::lists方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initializer.
*
* @access public
* @return BaseController
*/
public function __construct()
{
$is_admin = Request::is('admin*');
$is_backend = Request::is('backend*');
/* Set middleware(s) based on route URLs */
if ($is_admin || $is_backend) {
$this->middleware('auth');
if ($is_backend) {
// Backend specific middleware
$this->middleware('auth.backend');
}
$this->middleware('auth.permissions');
if (!Request::is('*users/change-password')) {
// No validation for stale password if password is being changed
$this->middleware('auth.pw_6_months');
}
}
list($this->link_type, $this->link, $this->layout, $this->current_theme) = current_section();
View::share('link_type', $this->link_type);
View::share('current_theme', $this->current_theme);
$website_settings = Setting::lists('value', 'name')->all();
View::share('website_settings', $website_settings);
$locale = Setting::value('language');
App::setLocale($locale);
Lang::setLocale($locale);
$this->user = current_user();
View::share('current_user', $this->user);
View::share('current_user_companies', current_user_companies());
}
示例2: __construct
/**
* Initializer.
*
* @access public
* @return BaseController
*/
public function __construct()
{
list($this->link_type, $this->link, $this->layout, $this->current_theme) = current_section();
View::share('link_type', $this->link_type);
View::share('current_theme', $this->current_theme);
$website_settings = Setting::lists('value', 'name');
View::share('website_settings', $website_settings);
$this->user = current_user();
View::share('current_user', $this->user);
}
示例3: __construct
/**
* Initializer.
*
* @access public
* @return BaseController
*/
public function __construct()
{
list($this->link_type, $this->link, $this->layout, $this->current_theme) = current_section();
View::share('link_type', $this->link_type);
View::share('current_theme', $this->current_theme);
$website_settings = Setting::lists('value', 'name');
View::share('website_settings', $website_settings);
$locale = Setting::value('language');
App::setLocale($locale);
Lang::setLocale($locale);
$this->user = current_user();
View::share('current_user', $this->user);
View::share('current_user_companies', current_user_companies());
}
示例4: setupLayout
protected function setupLayout()
{
$type_page = Type::where('status', 1)->lists('name', 'type');
$settings = Setting::lists('value', 'name');
View::share(['settings' => $settings, 'type_page' => $type_page]);
}
示例5: setupLayout
protected function setupLayout()
{
$type_page = Post::where('status', 1)->where('type_id', 4)->where('parent', 0)->lists('name', 'slug');
$settings = Setting::lists('value', 'name');
View::share(['settings' => $settings, 'type_page' => $type_page]);
}