本文整理汇总了PHP中Illuminate\Contracts\Foundation\Application::isInstalled方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::isInstalled方法的具体用法?PHP Application::isInstalled怎么用?PHP Application::isInstalled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Foundation\Application
的用法示例。
在下文中一共展示了Application::isInstalled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set
/**
* @param $key
* @param $value
* @return bool
*/
public function set($key, $value)
{
$setting = Setting::whereKey($key)->first();
if (!is_object($setting)) {
$setting = new Setting();
$setting->key = $key;
}
$setting->value = $value;
$setting->save();
if ($this->application->isInstalled()) {
$this->cache->forget($this->cache_key);
}
return true;
}
示例2: bootstrap
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $application
*
* @return void
*/
public function bootstrap(Application $application)
{
if ($application->isInstalled()) {
if ($application->routesAreCached()) {
$application->booted(function () use($application) {
require $application->getCachedRoutesPath();
});
} else {
$application->make('events')->fire(new RouteRegister($application, $application['router']));
$application->booted(function () use($application) {
$application['router']->getRoutes()->refreshNameLookups();
});
}
}
}
示例3: bootstrap
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application|\Notadd\Foundation\Application $application
*
* @return void
*/
public function bootstrap(Application $application)
{
if ($application->isInstalled()) {
$config = $application->make(ConfigRepository::class);
$setting = $application->make(SettingsRepository::class);
date_default_timezone_set($setting->get('setting.timezone', $config['app.timezone']));
$config->set('app.debug', $setting->get('setting.debug', true));
$config->set('mail.driver', $setting->get('mail.driver', 'smtp'));
$config->set('mail.host', $setting->get('mail.host'));
$config->set('mail.port', $setting->get('mail.port'));
$config->set('mail.from.address', $setting->get('mail.from'));
$config->set('mail.from.name', $setting->get('site.title', 'Notadd'));
$config->set('mail.encryption', $setting->get('mail.encryption'));
$config->set('mail.username', $setting->get('mail.username'));
$config->set('mail.password', $setting->get('mail.password'));
}
}