当前位置: 首页>>代码示例>>PHP>>正文


PHP Setting::all方法代码示例

本文整理汇总了PHP中Setting::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::all方法的具体用法?PHP Setting::all怎么用?PHP Setting::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Setting的用法示例。


在下文中一共展示了Setting::all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $settings = Setting::all();
     $suspects = Suspect::all();
     $users = User::orderBy('username')->paginate(self::$per_page);
     return View::make('settings.index', ['settings' => $settings, 'users' => $users, 'suspects' => $suspects]);
 }
开发者ID:y0sh1,项目名称:logboek,代码行数:12,代码来源:SuspectsController.php

示例2: index

 /**
  * Display a listing of settings
  *
  * @return Response
  */
 public function index()
 {
     $settings = Setting::all();
     $shopsettings = Shopsetting::all();
     $receiptsettings = Receiptsetting::all();
     return View::make('settings.index', compact('settings', 'shopsettings', 'receiptsettings'));
 }
开发者ID:noikiy,项目名称:posco-laravel-server,代码行数:12,代码来源:SettingsController.php

示例3: getIndex

 /**
  * Show a list of all the comment posts.
  *
  * @return View
  */
 public function getIndex()
 {
     View::share('settings', Setting::all());
     // Title
     $title = Lang::get('admin/settings/title.title');
     // Show the page
     return View::make('admin/settings/index', compact('comments', 'title'));
 }
开发者ID:hilmysyarif,项目名称:l4-bootstrap-admin,代码行数:13,代码来源:AdminSettingsController.php

示例4: obtain

 public static function obtain()
 {
     $configs = Setting::all();
     $result = array();
     foreach ($configs as $item) {
         $result[$item->setting] = $item->value;
     }
     return $result;
 }
开发者ID:TahsinGokalp,项目名称:L3-Eticaret,代码行数:9,代码来源:Setting.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $users = User::orderBy('username')->paginate(self::$per_page);
     $this->features = ['entries', 'logbooks', 'tasks', 'attachments', 'evidences', 'exports', 'cipher'];
     View::share('users', $users);
     View::share('settings', Setting::all());
     View::share('suspects', Suspect::all());
     View::share('features', $this->features);
 }
开发者ID:y0sh1,项目名称:logboek,代码行数:10,代码来源:SettingsController.php

示例6: __construct

 public function __construct()
 {
     $this->data['setting'] = Setting::all()->first();
     if (!isset($this->data['setting']) && count($this->data['setting']) == 0) {
         die('Database not uploaded.Please Upload the database');
     }
     if (count($this->data['setting'])) {
     }
     $this->data['loggedAdmin'] = Auth::admin()->get();
     $this->data['pending_applications'] = Attendance::where('application_status', '=', 'pending')->get();
 }
开发者ID:rodrigopbel,项目名称:ong,代码行数:11,代码来源:AdminBaseController.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $users = User::orderBy('username')->paginate(self::$per_page);
     $legals = Legal::orderBy('id')->paginate(self::$per_page);
     $this->features = ['entries', 'logbooks', 'tasks', 'attachments', 'evidences', 'exports', 'tools'];
     $this->export_features = ['ex_title', 'ex_customer', 'ex_date', 'ex_version', 'ex_disclaimer', 'ex_pdf_sh_evidences', 'ex_pdf_sh_coc', 'ex_pdf_sh_attachments', 'ex_pdf_sh_suspects', 'ex_pdf_sh_legals', 'ex_html_sh_evidences', 'ex_html_sh_coc', 'ex_html_sh_attachments', 'ex_html_sh_suspects', 'ex_html_sh_legals'];
     View::share('users', $users);
     View::share('settings', Setting::all());
     View::share('suspects', Suspect::all());
     View::share('features', $this->features);
     View::share('legals', $legals);
 }
开发者ID:l0ngestever,项目名称:logboek,代码行数:13,代码来源:SettingsController.php

示例8: getSettings

 /**
  * Get settings from DB.
  *
  * @return array
  */
 public function getSettings()
 {
     global $data;
     global $settings;
     $rawSettings = Setting::all();
     $settings = array();
     foreach ($rawSettings as $key => $data) {
         if ($data['type'] == 'array') {
             $data['value'] = json_decode($data['value']);
         }
         $settings[$data['code']] = $data['value'];
     }
 }
开发者ID:KentaroMorishita,项目名称:autham_portal_api,代码行数:18,代码来源:BaseController.php

示例9: loadConstants

 public function loadConstants()
 {
     if (!($settings = Cache::read('settings', 'settings'))) {
         App::import('Model', 'Settings.Setting');
         $setting = new Setting();
         $settings = $setting->all();
         Cache::write('settings', $settings, 'settings');
     }
     for ($i = sizeof($settings) - 1; $i >= 0; $i--) {
         $constant = $this->constantName(array($settings[$i]['Setting']['plugin'], $settings[$i]['Setting']['controller'], $settings[$i]['Setting']['action'], $settings[$i]['Setting']['setting']));
         if (defined($constant)) {
             continue;
         }
         define($constant, $settings[$i]['Setting']['value']);
     }
 }
开发者ID:riverans,项目名称:manage-expenses,代码行数:16,代码来源:SettingsComponent.php

示例10: post_view

 public function post_view()
 {
     if (!cmsHelper::isCurrentUserAllowedToPerform('settings')) {
         return;
     }
     Input::flash();
     //Add rules here
     $rules = array('articlelimit' => 'required', 'articlesize' => 'required', 'commentsize' => 'required', 'convertemotions' => 'required', 'maintenance' => 'required', 'textboxrows' => 'required', 'unregistercomments' => 'required');
     //Get all inputs fields
     $input = Input::all();
     //Apply validaiton rules
     $validation = Validator::make($input, $rules);
     if ($validation->fails()) {
         return Redirect::to("/admin/settings/view")->with_errors($validation);
     }
     $settings = Setting::all();
     foreach ($settings as $setting) {
         $setting->value = Input::get($setting->keyname);
         $setting->save();
     }
     Input::flush();
     return Redirect::to("/admin/settings/view")->with("successmessage", "Settings updated");
 }
开发者ID:gischen,项目名称:PHP-CMS,代码行数:23,代码来源:settings.php

示例11: array

<?php

/**
 * Created by PhpStorm.
 * User: rahman
 * Date: 13/10/14
 * Time: 14:10
 */
$list = array('log_file' => 'log_file', 'domain_limit' => '3');
$format = function (&$list, $keys, $val) use(&$format) {
    $keys ? $format($list[array_shift($keys)], $keys, $val) : ($list = $val);
};
if (Schema::hasTable('settings')) {
    foreach (Setting::all() as $setting) {
        $format($list, explode('.', $setting->name), $setting->value);
    }
}
return $list;
开发者ID:digideskio,项目名称:voip-id,代码行数:18,代码来源:settings.php

示例12: getIndex

 /**
  * Show a list of all the comment posts.
  *
  * @return View
  */
 public function getIndex()
 {
     $settings = Setting::all();
     $title = Lang::get('admin/settings/title.title');
     return Theme::make('admin/settings/index', compact('comments', 'title', 'settings'));
 }
开发者ID:Aranjedeath,项目名称:l4-starter,代码行数:11,代码来源:AdminSettingsController.php

示例13: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return Setting::all();
 }
开发者ID:howlowck,项目名称:settings-l4,代码行数:9,代码来源:SettingsController.php

示例14:

<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
if ($app = Setting::all()) {
    Route::get('/', 'HomeController@index');
    Route::get('/adopt', 'AdoptController@view');
    //Admin
    Route::get('/admin', 'AdminController@view');
    Route::post('/admin', 'AdminController@login');
    Route::get('/admin/register', 'AdminController@getreg');
    Route::post('/admin/register', 'AdminController@postreg');
    //General Pages
    Route::get('/{slug}', 'PageController@view');
} else {
    Route::get('*', 'InstallController@view');
}
开发者ID:sgehly,项目名称:Old-Ugly-Abandoned-Stuff,代码行数:25,代码来源:routes.php

示例15: edit

 /**
  * Show the form for editing the specified Admin.
  */
 public function edit()
 {
     $this->data['notificationSettingActive'] = 'active';
     $this->data['setting'] = Setting::all()->first();
     return View::make('admin.notificationSettings.edit', $this->data);
 }
开发者ID:rodrigopbel,项目名称:ong,代码行数:9,代码来源:NotificationSettingsController.php


注:本文中的Setting::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。