Skip to content

Commit 3b37016

Browse files
committed
updates dependencies; refactors the table for v3; refactors publisheable assets into stubs
1 parent 0e93969 commit 3b37016

File tree

7 files changed

+15
-8
lines changed

7 files changed

+15
-8
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
],
2828
"require": {
2929
"box/spout": "3.0.*",
30-
"laravel-enso/core": "4.4.*",
30+
"laravel-enso/core": "4.5.*",
3131
"laravel-enso/enums": "1.1.*",
3232
"laravel-enso/files": "3.2.*",
33-
"laravel-enso/helpers": "1.12.*",
33+
"laravel-enso/helpers": "1.2.*",
3434
"laravel-enso/io": "1.2.*",
3535
"laravel-enso/migrator": "1.0.*",
3636
"laravel-enso/track-who": "1.8.*",

src/AppServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ private function publish()
4848
], 'enso-factories');
4949

5050
$this->publishes([
51-
__DIR__.'/../resources' => app_path(),
51+
__DIR__.'/../stubs/Imports/Importers/ExampleImporter.stub' => app_path('Imports/Importers/ExampleImporter.php'),
52+
__DIR__.'/../stubs/Imports/Templates/exampleTemplate.stub' => app_path('Imports/Templates/exampleTemplate.json'),
53+
__DIR__.'/../stubs/Imports/Validators/CustomValidator.stub' => app_path('Imports/Validators/CustomValidator.php'),
5254
], 'data-import-examples');
5355

5456
$this->publishes([

src/app/Tables/Builders/DataImportTable.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
namespace LaravelEnso\DataImport\app\Tables\Builders;
44

5-
use LaravelEnso\Tables\app\Services\Table;
5+
use Illuminate\Database\Eloquent\Builder;
6+
use LaravelEnso\Tables\app\Contracts\Table;
67
use LaravelEnso\DataImport\app\Models\DataImport;
78
use LaravelEnso\DataImport\app\Models\RejectedImportSummary;
89

9-
class DataImportTable extends Table
10+
class DataImportTable implements Table
1011
{
11-
protected $templatePath = __DIR__.'/../Templates/dataImports.json';
12+
protected const TemplatePath = __DIR__.'/../Templates/dataImports.json';
1213

13-
public function query()
14+
public function query(): Builder
1415
{
1516
return DataImport::selectRaw('
1617
data_imports.id, data_imports.type, data_imports.status, data_imports.status as computedStatus,
@@ -27,4 +28,9 @@ public function query()
2728
->where('rejected_files.attachable_type', RejectedImportSummary::class);
2829
});
2930
}
31+
32+
public function templatePath(): string
33+
{
34+
return static::TemplatePath;
35+
}
3036
}

src/app/Tables/Templates/dataImports.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"routePrefix": "import",
33
"crtNo": true,
44
"appends": ["entries"],
5-
"cache": true,
65
"buttons": [
76
"excel",
87
{
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)