當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。