The
config_path
function returns the fully qualified path to your application's config
directory. You may also use the config_path
function to generate a fully qualified path to a given file within the application's configuration directory:<?php $path = config_path();
$path = config_path('app.php');
<?php {
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/flare.php' => config_path('flare.php'),
], 'flare-config');
$this->publishes([
<?php ], 'flare-config');
$this->publishes([
__DIR__.'/../config/ignition.php' => config_path('ignition.php'),
], 'ignition-config');
if (isset($_SERVER['argv']) && ['artisan', 'tinker'] === $_SERVER['argv']) {
<?php {
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/octane.php' => config_path('octane.php'),
], 'octane-config');
}
}
<?php public function boot()
{
$this->publishes([
__DIR__.'/../../config/config.php' => config_path('image.php')
]);
<?php $config = __DIR__.'/../../../../imagecache/src/config/config.php';
$this->publishes([
$config => config_path('imagecache.php')
]);
<?php protected function writeSiteConfig($config)
{
$contents = File::get($path = config_path('statamic/sites.php'));
$newConfig = $this->newSiteConfigs->map(function ($config, $site) {
<?php }
$filesystemsPath = config_path('filesystems.php');
$config = $this->files->get($filesystemsPath);
$diskRegex = "/\s{8}['\"]{$disk}['\"]\X*\s{8}\],?+\n\n?+/mU";
$updatedConfig = preg_replace($diskRegex, '', $config);
<?php protected function resetStatamicConfigs()
{
$this->files->cleanDirectory(config_path('statamic'));
$this->files->copyDirectory(__DIR__.'/../../../config', config_path('statamic'));
$this->files->copy(__DIR__.'/stubs/config/stache.php.stub', config_path('statamic/stache.php'));
<?php {
$this->files->cleanDirectory(config_path('statamic'));
$this->files->copyDirectory(__DIR__.'/../../../config', config_path('statamic'));
$this->files->copy(__DIR__.'/stubs/config/stache.php.stub', config_path('statamic/stache.php'));
$this->files->copy(__DIR__.'/stubs/config/users.php.stub', config_path('statamic/users.php'));
<?php $this->files->cleanDirectory(config_path('statamic'));
$this->files->copyDirectory(__DIR__.'/../../../config', config_path('statamic'));
$this->files->copy(__DIR__.'/stubs/config/stache.php.stub', config_path('statamic/stache.php'));
$this->files->copy(__DIR__.'/stubs/config/users.php.stub', config_path('statamic/users.php'));
$this->info('Statamic configs reset successfully.');
<?php $this->files->copyDirectory(__DIR__.'/../../../config', config_path('statamic'));
$this->files->copy(__DIR__.'/stubs/config/stache.php.stub', config_path('statamic/stache.php'));
$this->files->copy(__DIR__.'/stubs/config/users.php.stub', config_path('statamic/users.php'));
$this->info('Statamic configs reset successfully.');
<?php private function hasPublishedConfig()
{
return $this->app['files']->exists(config_path('graphql.php'));
}
private function addMiddleware()
<?php $str = '<?php return '.VarExporter::export($config).';';
File::put(config_path('statamic/editions.php'), $str);
}
}
<?php $this->mergeConfigFrom($origin, $filename);
$this->publishes([
$origin => config_path("{$filename}.php"),
], "{$filename}-config");
return $this;
<?php $this->loadViewsFrom("{$this->root}/resources/views", 'statamic');
collect($this->configFiles)->each(function ($config) {
$this->publishes(["{$this->root}/config/$config.php" => config_path("statamic/$config.php")], 'statamic');
});
$this->publishes([