本文整理汇总了PHP中Setting::getSiteSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getSiteSettings方法的具体用法?PHP Setting::getSiteSettings怎么用?PHP Setting::getSiteSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::getSiteSettings方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->user = Sentry::getUser();
$this->isAdmin = User::isAdmin($this->user);
$this->logged_in_for = $this->user->last_login->diffForHumans();
$this->configs = Setting::getSiteSettings();
}
示例2: index
public function index()
{
$user = Sentry::getUser();
$isAdmin = User::isAdmin($user);
$configs = Setting::getSiteSettings();
$logged_in_for = $user->last_login->diffForHumans();
return View::make('backend.dashboards.index', ['user' => $user, 'isAdmin' => $isAdmin, 'configs' => $configs, 'logged_in_for' => $logged_in_for, 'activeParent' => 'index', 'active' => 'index']);
}
示例3: __construct
public function __construct()
{
$this->user = Sentry::getUser();
$this->isAdmin = User::isAdmin($this->user);
$this->logged_in_for = $this->user->last_login->diffForHumans();
$this->configs = Setting::getSiteSettings();
$this->paginate = Addressbook::getRecordsPerPage();
$this->orderBy = Addressbook::getOrderBy();
$this->cacheMinutes = 30;
$this->rules = Addressbook::$rules;
$this->activeParent = 'lists';
}
示例4: unsubscribe
public function unsubscribe($id)
{
$subscriber = Subscriber::find((int) $id);
if ($subscriber) {
$subscriber->active = 0;
$subscriber->save();
$configs = Setting::getSiteSettings();
return View::make('frontend.unsubscribe', ['subscriber' => $subscriber, 'configs' => $configs]);
} else {
echo 'User not found.';
}
}
示例5: __construct
public function __construct()
{
$this->user = Sentry::getUser();
$this->isAdmin = User::isAdmin($this->user);
$this->logged_in_for = $this->user->last_login->diffForHumans();
$this->configs = Setting::getSiteSettings();
$this->paginate = User::getRecordsPerPage($this->user->id);
$this->orderBy = User::getOrderBy($this->user->id);
$this->rules = User::$rules;
$this->editRules = User::$editRules;
$this->newUserRules = User::$newUserRules;
$this->activeParent = 'users';
}
示例6: __construct
public function __construct()
{
$this->user = Sentry::getUser();
$this->isAdmin = User::isAdmin($this->user);
$this->logged_in_for = $this->user->last_login->diffForHumans();
$this->configs = Setting::getSiteSettings();
$this->paginate = Maillist::getRecordsPerPage();
$this->orderBy = Maillist::getOrderBy();
$this->cacheMinutes = 30;
$this->rules = Maillist::$rules;
$this->activeParent = 'lists';
$this->subscriberRules = Subscriber::$rules;
$this->fileSizeRules = Subscriber::$fileRules;
}
示例7: __construct
public function __construct()
{
$this->user = Sentry::getUser();
$this->isAdmin = User::isAdmin($this->user);
$this->logged_in_for = $this->user->last_login->diffForHumans();
$this->configs = Setting::getSiteSettings();
// $this->paginate = Subscriber::getRecordsPerPage();
// $this->orderBy = Subscriber::getOrderBy();
// $this->cacheMinutes = 30;
$this->rules = Email::$rules;
$this->draftRules = Draft::$rules;
// $this->editRules = Subscriber::$editRules;
$this->activeParent = 'emails';
}
示例8: do_set
public function do_set()
{
$rules = ['sitename' => 'required|max:255', 'sender_name' => 'required|max:510', 'sender_email' => 'required|email', 'reply_to_email' => 'required|email'];
$validation = Jamesy\MyValidations::validate(Input::all(), $rules);
if ($validation != NULL) {
return Response::json(['validation' => $validation]);
} else {
$setting = Setting::getSiteSettings();
$setting->sitename = Input::get('sitename');
$setting->save();
$user = Sentry::getUser();
Setting::setFromName($user, Input::get('sender_name'));
Setting::setFromEmail($user, Input::get('sender_email'));
Setting::setReplyToEmail($user, Input::get('reply_to_email'));
return Response::json(['success' => 'Settings successfully saved.']);
}
}