本文整理汇总了PHP中app\Config::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::all方法的具体用法?PHP Config::all怎么用?PHP Config::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Config
的用法示例。
在下文中一共展示了Config::all方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$configs = Config::all();
if ($request->ajax()) {
return $configs->toArray();
}
return view('admin.configs.index', ['configs' => $configs]);
}
示例2: setting
public function setting()
{
$configs = Config::all();
$data = ['pageName' => 'setting'];
foreach ($configs as $config) {
$data[$config->key] = $config->value;
}
return view('setting', $data);
}
示例3: keys
public function keys()
{
$params = Config::all();
$keys = [];
foreach ($params as $param) {
array_push($keys, $param->key);
}
return $keys;
}
示例4: loadConfigs
protected function loadConfigs()
{
foreach (Config::all() as $config) {
$this->configs[$config->key] = $config->value;
}
foreach ($this->defaultConfigs as $key => $value) {
if (!array_key_exists($key, $this->configs)) {
$this->configs[$key] = $value;
}
}
}
示例5: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return view('config.index', ['configs' => Config::all()]);
}
示例6: composerNavigationF
public function composerNavigationF()
{
view()->composer('footer', function ($view) {
$view->with('config', Config::all());
});
}
示例7: contacts
/**
* Display a listing of the resource.
*
* @return Response
*/
public function contacts()
{
$contacts = Config::all();
return view('layouts.contacts')->with('contacts', $contacts);
}
示例8: __construct
public function __construct()
{
foreach (\App\Config::all() as $config) {
$this->_config[$config->key] = $config->value;
}
}