mirror of
https://github.com/wearepixel/laravel-comments.git
synced 2026-11-14 14:02:04 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace BeyondCode\Comments;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class CommentsServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->publishes([
|
||||
__DIR__.'/../config/config.php' => config_path('comments.php'),
|
||||
], 'config');
|
||||
|
||||
|
||||
if (! class_exists('CreateCommentsTable')) {
|
||||
$this->publishes([
|
||||
__DIR__.'/../database/migrations/create_comments_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_comments_table.php'),
|
||||
], 'migrations');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'comments');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user