本文整理汇总了PHP中config_path函数的典型用法代码示例。如果您正苦于以下问题:PHP config_path函数的具体用法?PHP config_path怎么用?PHP config_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了config_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
parent::register();
$configPath = realpath(__DIR__ . '/../config/UEditorUpload.php');
$this->mergeConfigFrom($configPath, 'UEditorUpload');
$this->publishes([$configPath => config_path('UEditorUpload.php')], 'config');
}
示例2: boot
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
{
$this->publishes([__DIR__ . '/../config/themes.php' => config_path('themes.php')]);
$this->app['themes']->setTheme($this->app['request']);
$this->mapWebRoutes();
$this->mapApiRoutes();
}
示例3: boot
/**
* Boot the package.
*
* @return void
*/
public function boot()
{
$this->publishes([__DIR__ . '/../config/config.php' => config_path('forever.php')], 'config');
foreach ($this->commands as $key => $value) {
$this->commands($this->namespace . $key);
}
}
示例4: boot
public function boot()
{
if (!$this->app->routesAreCached()) {
require __DIR__ . '/Http/routes.php';
}
$this->publishes([__DIR__ . '/../config/config.php' => config_path('genealabs-laravel-caffeine.php')], 'genealabs-laravel-caffeine');
}
示例5: boot
/**
* Bootstrap application services.
*
* @param Router $router
*/
public function boot(Router $router)
{
$configPath = __DIR__ . '/../config/laravel-oauth2-client.php';
$this->publishes([$configPath => config_path('laravel-oauth2-client.php')], 'config');
$this->loginRoute($router);
$this->logoutRoute($router);
}
示例6: boot
/**
*
*/
public function boot()
{
$this->app->singleton('moip-client', function () {
return new MoipClient(config('moip-assinaturas.api_token'), config('moip-assinaturas.api_key'), config('moip-assinaturas.environment', 'api'));
});
$this->app->singleton('moip-api', function () {
return new Api(app('moip-client'));
});
$this->app->bind('moip-plans', function () {
return app('moip-api')->plans();
});
$this->app->bind('moip-subscriptions', function () {
return app('moip-api')->subscriptions();
});
$this->app->bind('moip-customers', function () {
return app('moip-api')->customers();
});
$this->app->bind('moip-invoices', function () {
return app('moip-api')->invoices();
});
$this->app->bind('moip-preferences', function () {
return app('moip-api')->preferences();
});
$this->app->bind('moip-payments', function () {
return app('moip-api')->payments();
});
$this->publishes([__DIR__ . '/../../../config/config.php' => config_path('moip-assinaturas.php')]);
}
示例7: boot
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
// Paths
$path_views = __DIR__ . '/../resources/views';
$path_lang = __DIR__ . '/../resources/lang';
$path_middleware = __DIR__ . '/Middleware';
$path_assets = __DIR__ . '/../resources/assets';
// Publish Paths
$publish_path_views = base_path('resources/views/nonoesp/writing');
$publish_path_lang = base_path('resources/lang/nonoesp/writing');
$publish_path_middleware = base_path('app/Http/Middleware');
$publish_path_assets = base_path('public/nonoesp/writing');
$publish_path_config = config_path('writing.php');
// Publish Stuff
$this->publishes([$path_views => $publish_path_views], 'views');
$this->publishes([$path_lang => $publish_path_lang], 'lang');
//$this->publishes([$path_middleware => $publish_path_middleware,], 'middleware');
$this->publishes([$path_assets => $publish_path_assets], 'assets');
$this->publishes([__DIR__ . '/../config/config.php' => $publish_path_config], 'config');
$this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'writing');
// Views
if (is_dir($publish_path_views)) {
$this->loadViewsFrom($publish_path_views, 'writing');
// Load published views
} else {
$this->loadViewsFrom($path_views, 'writing');
}
// Translations
if (is_dir($publish_path_lang)) {
$this->loadTranslationsFrom($publish_path_lang, 'writing');
// Load published lang
} else {
$this->loadTranslationsFrom($path_lang, 'writing');
}
}
示例8: boot
/**
* Boot the service provider.
*/
public function boot()
{
if (!$this->app->environment('production')) {
$this->publishes([__DIR__ . '/resources/config.php' => config_path('chronicle.php')], 'config');
$this->publishes([__DIR__ . '/database/migrations/' => database_path('/migrations')], 'migrations');
}
}
示例9: getConfig
private function getConfig()
{
if (file_exists(config_path('thinktomorrow/locale.php'))) {
return require config_path('thinktomorrow/locale.php');
}
return require __DIR__ . '/config/locale.php';
}
示例10: boot
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->publishes([__DIR__ . '/../config/sqs-plain.php' => config_path('sqs-plain.php')]);
Queue::after(function (JobProcessed $event) {
$event->job->delete();
});
}
示例11: boot
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot(Router $router)
{
// Tell Laravel where the views for a given namespace are located.
$this->loadViewsFrom(base_path('vendor/aginev/acl/src/resources/views'), 'acl');
$this->publishes([base_path('vendor/aginev/acl/src/resources/views') => base_path('resources/views/vendor/acl')], 'views');
// Publish assets
$this->publishes([base_path('vendor/aginev/acl/src/public') => public_path('vendor/acl')], 'public');
// Tell Laravel where the translations for a given namespace are located.
$this->loadTranslationsFrom(base_path('vendor/aginev/acl/src/resources/lang'), 'acl');
$this->publishes([base_path('vendor/aginev/acl/src/resources/lang') => base_path('resources/lang/vendor/acl')], 'lang');
// Merge config
$this->mergeConfigFrom(base_path('vendor/aginev/acl/src/config/acl.php'), 'acl');
$this->publishes([base_path('vendor/aginev/acl/src/config/acl.php') => config_path('acl.php')], 'config');
// Publish migrations
$this->publishes([base_path('vendor/aginev/acl/src/Database/Migrations/') => base_path('/database/migrations')], 'migrations');
// Publish seeds
$this->publishes([base_path('vendor/aginev/acl/src/Database/Seeds/') => base_path('/database/seeds')], 'seeds');
// Define the ACL route middleware
$router->middleware('acl', 'Aginev\\Acl\\Http\\Middleware\\Acl');
/**
* Including A Routes File From A Service Provider
* NB! Keep this line at the very end of the method to be able to use the config at routes.php
*/
include base_path('vendor/aginev/acl/src/Http/routes.php');
}
示例12: boot
/**
* Bootstrap the application events.
*/
public function boot()
{
//
$configPath = __DIR__ . '/../config/larabloom.php';
$this->publishes([$configPath => config_path('larabloom.php')]);
//$this->mergeConfigFrom($configPath, 'larabloom');
}
示例13: generate_data_file
function generate_data_file($filename, $content)
{
if (!assert(ctype_alnum(str_replace(array('-', '_', '.'), '', $filename)))) {
return FALSE;
}
return file_put_contents(config_path('dataDirectory', $filename), $content, LOCK_EX);
}
示例14: boot
public function boot()
{
$this->publishes([__DIR__ . '/../config/flash.php' => config_path('flash.php')]);
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'flash');
$this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/flash')]);
$this->mergeConfigFrom(__DIR__ . '/../config/flash.php', 'flash');
}
示例15: __construct
/**
* @param Filesystem $file
* @param Factory $validator
* @param Colors $colors
*/
public function __construct(Filesystem $file, Factory $validator, Colors $colors)
{
$this->file = $file;
$this->validator = $validator;
$this->config = config_path('nukacode-frontend.php');
$this->colors = $colors;
}