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