Skip to content

Commit

Permalink
include config in service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh Sharma committed Apr 1, 2019
1 parent b8e6e81 commit bc6dd1a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/DatatableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ public function boot()
*/
public function register()
{
$dataTableConfig=__DIR__.'/config/Table.php';

// merge config
$this->mergeConfigFrom($dataTableConfig, 'datatable');

$this->publishes([
__DIR__.'/config/Table.php' => config_path('datatable.php'),
]);
],'datatable:config');

$this->app->singleton('datatable', function () {
return new Datatable;
});

$this->app->singleton('table', function () {
return new Table;
});
Expand Down

0 comments on commit bc6dd1a

Please sign in to comment.