Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rxcod9 authored and actions-user committed Mar 8, 2022
1 parent 866559c commit b1e6fcc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/Actions/ExportAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Joy\VoyagerExport\Actions;

use Joy\VoyagerExport\Exports\DataTypeExport;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Str;
Expand Down Expand Up @@ -40,7 +39,7 @@ public function getPolicy()
public function getAttributes()
{
return [
'class' => 'btn btn-sm btn-primary',
'class' => 'btn btn-sm btn-primary',
'target' => '_blank',
];
}
Expand Down
1 change: 0 additions & 1 deletion src/Console/Commands/AllDataTypesExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Joy\VoyagerExport\Exports\AllDataTypesExport as ExportsAllDataTypesExport;
use Maatwebsite\Excel\Excel;
use Symfony\Component\Console\Input\InputOption;

Expand Down
5 changes: 2 additions & 3 deletions src/Console/Commands/DataTypeExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Joy\VoyagerExport\Exports\DataTypeExport as ExportsDataTypeExport;
use Maatwebsite\Excel\Excel;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
Expand Down Expand Up @@ -50,8 +49,8 @@ protected function exportDataType(

$exportClass = 'joy-voyager-export.export';

if (app()->bound("joy-voyager-export." . $dataType->slug . ".export")) {
$exportClass = "joy-voyager-export." . $dataType->slug . ".export";
if (app()->bound('joy-voyager-export.' . $dataType->slug . '.export')) {
$exportClass = 'joy-voyager-export.' . $dataType->slug . '.export';
}

$export = app()->make($exportClass);
Expand Down
7 changes: 3 additions & 4 deletions src/Exports/AllDataTypesExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ public function sheets(): array
$dataTypes = Voyager::model('DataType')->get();

foreach ($dataTypes as $dataType) {

$exportClass = 'joy-voyager-export.export';

if (app()->bound("joy-voyager-export." . $dataType->slug . ".export")) {
$exportClass = "joy-voyager-export." . $dataType->slug . ".export";
if (app()->bound('joy-voyager-export.' . $dataType->slug . '.export')) {
$exportClass = 'joy-voyager-export.' . $dataType->slug . '.export';
}

$export = app()->make($exportClass);
$export = app()->make($exportClass);
$sheets[$dataType->getTranslatedAttribute('display_name_plural')] = $export->set($dataType);
}

Expand Down

0 comments on commit b1e6fcc

Please sign in to comment.