本文整理匯總了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]);
}