/** * 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]); }
/** * 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')); }
/** * 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')); }
public static function obtain() { $configs = Setting::all(); $result = array(); foreach ($configs as $item) { $result[$item->setting] = $item->value; } return $result; }
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); }
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(); }
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); }
/** * 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']; } }
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']); } }
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"); }
<?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;
/** * 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')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return Setting::all(); }
<?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'); }
/** * 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); }
public function index() { $settings = Setting::all(); return Theme::make('admin/settings/index', compact('comments', 'settings')); }
/** * Setup the layout used by the controller. * * @return void */ public function __construct() { $this->data['setting'] = Setting::all()->first(); }
/** * Display a listing of the resource. * * @return Response */ public function getIndex() { $settings = Setting::all(); return View::make('setting.index')->with('settings', $settings); }
/** * Display a listing of the resource. * */ public function index() { $settings = Setting::all(); return view('apanel.siteyonetimi.siteyonetimi')->with(array('ayar' => $settings)); }
public function getSettings() { $this->layout->body_class = 'user'; $data = array('settings' => Setting::all()); $this->layout->contents = View::make('admin/admin-settings', $data); }
Route::get('authenticate/{remember_token}', 'AuthenticateController@noPassword'); Route::get('background_image', 'BackgroundImageController@index'); // access across site because users need it to see what's going on, maybe?? Route::resource('setting', 'SettingController'); Route::get('/settings', function () { $user = null; if ($token = JWTAuth::getToken()) { $user = JWTAuth::parseToken()->authenticate(); } // return only particular keys like themename and background image i guess // question is: can this be handled in the controller // // need to run settings/create onload... // Setting::get('background_image', null); // Setting::get('theme', []); return Setting::all(); }); Route::get('/', function () { return view('index'); }); Route::group(array('middleware' => 'testing', 'prefix' => 'api'), function () { Route::resource('user', 'UserController'); Route::resource('ethnic_origin', 'EthnicOriginController'); Route::group(['middleware' => 'jwt.auth'], function () { Route::resource('role', 'RoleController'); Route::resource('background_image', 'BackgroundImageController'); Route::get('motion/{id}/restore', 'MotionController@restore'); Route::resource('motion', 'MotionController'); Route::resource('motion.comment', 'MotionCommentController', ['only' => ['index']]); Route::resource('motion.motionfile', 'MotionFileController'); Route::resource('motion.vote', 'MotionVoteController', ['only' => ['index']]);