Skip to content

Commit 8cc8b35

Browse files
committed
Initial commit
1 parent c1466e2 commit 8cc8b35

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

config/cms.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
return [
4+
/*
5+
|--------------------------------------------------------------------------
6+
| Some config option
7+
|--------------------------------------------------------------------------
8+
|
9+
| Give a description of what each config option is like this
10+
|
11+
*/
12+
13+
// TODO
14+
];

src/CmsServiceProvider.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace Javaabu\Cms;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class CmsServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Bootstrap the application services.
11+
*/
12+
public function boot()
13+
{
14+
// declare publishes
15+
if ($this->app->runningInConsole()) {
16+
$this->publishes([
17+
__DIR__ . '/../config/cms.php' => config_path('cms.php'),
18+
], 'cms-config');
19+
}
20+
}
21+
22+
/**
23+
* Register the application services.
24+
*/
25+
public function register()
26+
{
27+
// merge package config with user defined config
28+
$this->mergeConfigFrom(__DIR__ . '/../config/cms.php', 'cms');
29+
}
30+
}

0 commit comments

Comments
 (0)