Skip to content

Commit

Permalink
code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh Sharma committed Nov 7, 2019
1 parent 3400cf4 commit 114d0f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "iyogesharma/datatable-laravel",
"description": "package to help in handling both server and client side datatable.js operations",
"type": "helper",
"version": "1.0.3-dev",
"version": "1.0.3",
"license": "MIT",
"authors": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/Datatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function of($source)
if ($this->valid($source)) {
return $this;
}
throw new \Exception("Data source must be instance of" . "\Illuminate\Database\Eloquent\Builder");
throw new \Exception("Data source not recognize please check query and try again");
}

/**
Expand All @@ -128,7 +128,7 @@ public function make($source)
if ($this->valid($source)) {
return json_encode($this->response());
}
throw new \Exception("Data source must be instance of \Illuminate\Database\Eloquent\Builder");
throw new \Exception("Data source not recognize please check query and try again");
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/DatatableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public function boot()
public function register()
{
$dataTableConfig=__DIR__.'/config/Table.php';

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

Expand All @@ -35,6 +34,7 @@ public function register()
$this->app->singleton('datatable', function () {
return new Datatable;
});

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

0 comments on commit 114d0f4

Please sign in to comment.