Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rxcod9 committed Mar 17, 2022
1 parent c86bd86 commit 902aa19
Show file tree
Hide file tree
Showing 30 changed files with 175 additions and 175 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a Question
url: https://github.com/rxcod9/joy-voyager-import/discussions/new?category=q-a
url: https://github.com/rxcod9/joy-voyager-bulk-update/discussions/new?category=q-a
about: Ask the community for help
- name: Feature Request
url: https://github.com/rxcod9/joy-voyager-import/discussions/new?category=ideas
url: https://github.com/rxcod9/joy-voyager-bulk-update/discussions/new?category=ideas
about: Share ideas for new features
- name: Bug Report
url: https://github.com/rxcod9/joy-voyager-import/issues/new
url: https://github.com/rxcod9/joy-voyager-bulk-update/issues/new
about: Report a reproducable bug
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Joy VoyagerImport
# Joy VoyagerBulkUpdate

This [Laravel](https://laravel.com/)/[Voyager](https://voyager.devdojo.com/) module adds VoyagerImport support to Voyager.
This [Laravel](https://laravel.com/)/[Voyager](https://voyager.devdojo.com/) module adds VoyagerBulkUpdate support to Voyager.

By 🐼 [Ramakant Gangwar](https://github.com/rxcod9).

[![Screenshot](https://raw.githubusercontent.com/rxcod9/joy-voyager-import/main/cover.jpg)](https://joy-voyager.herokuapp.com/)
[![Screenshot](https://raw.githubusercontent.com/rxcod9/joy-voyager-bulk-update/main/cover.jpg)](https://joy-voyager.herokuapp.com/)

[![Latest Version](https://img.shields.io/github/v/release/rxcod9/joy-voyager-import?style=flat-square)](https://github.com/rxcod9/joy-voyager-import/releases)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rxcod9/joy-voyager-import/run-tests?label=tests)
[![Total Downloads](https://img.shields.io/packagist/dt/joy/voyager-import.svg?style=flat-square)](https://packagist.org/packages/joy/voyager-import)
[![Latest Version](https://img.shields.io/github/v/release/rxcod9/joy-voyager-bulk-update?style=flat-square)](https://github.com/rxcod9/joy-voyager-bulk-update/releases)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rxcod9/joy-voyager-bulk-update/run-tests?label=tests)
[![Total Downloads](https://img.shields.io/packagist/dt/joy/voyager-bulk-update.svg?style=flat-square)](https://packagist.org/packages/joy/voyager-bulk-update)

---

Expand All @@ -24,13 +24,13 @@ By 🐼 [Ramakant Gangwar](https://github.com/rxcod9).

```bash
# 1. Require this Package in your fresh Laravel/Voyager project
composer require joy/voyager-import
composer require joy/voyager-bulk-update

# 2. Publish everything
php artisan vendor:publish --provider="Joy\VoyagerImport\VoyagerImportServiceProvider" --force
php artisan vendor:publish --provider="Joy\VoyagerBulkUpdate\VoyagerBulkUpdateServiceProvider" --force

# 3. OR Publish Voyager overrided actions blade [MANDATORY STEP FOR IMPORT BULK BUTTON TO WORK]
php artisan vendor:publish --provider="Joy\VoyagerImport\VoyagerImportServiceProvider" --tag=voyager-actions-views --force
php artisan vendor:publish --provider="Joy\VoyagerBulkUpdate\VoyagerBulkUpdateServiceProvider" --tag=voyager-actions-views --force
```

---
Expand All @@ -43,15 +43,15 @@ Installation generates.

<!-- ## Views Customization
In order to override views delivered by Voyager DataTable, copy contents from ``vendor/joy/voyager-import/resources/views`` to the ``views/vendor/joy-voyager-import`` directory of your Laravel installation. -->
In order to override views delivered by Voyager DataTable, copy contents from ``vendor/joy/voyager-bulk-update/resources/views`` to the ``views/vendor/joy-voyager-bulk-update`` directory of your Laravel installation. -->

## Working Example

You can try laravel demo here [https://joy-voyager.herokuapp.com/admin/users](https://joy-voyager.herokuapp.com/admin/users).

## Documentation

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the joy voyager-import? Feel free to [create an issue on GitHub](https://github.com/rxcod9/joy-voyager-import/issues), we'll try to address it as soon as possible.
Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the joy voyager-bulk-update? Feel free to [create an issue on GitHub](https://github.com/rxcod9/joy-voyager-bulk-update/issues), we'll try to address it as soon as possible.

If you've found a bug regarding security please mail [[email protected]](mailto:[email protected]) instead of using the issue tracker.

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "joy/voyager-import",
"description": "This Laravel/Voyager module adds VoyagerImport support to Voyager.",
"name": "joy/voyager-bulk-update",
"description": "This Laravel/Voyager module adds VoyagerBulkUpdate support to Voyager.",
"keywords": [
"joy",
"voyager-import",
"joy-voyager-import",
"voyager-voyager-import",
"voyager-bulk-update",
"joy-voyager-bulk-update",
"voyager-voyager-bulk-update",
"cms",
"voyager",
"laravel"
],
"homepage": "https://github.com/rxcod9/joy-voyager-import",
"homepage": "https://github.com/rxcod9/joy-voyager-bulk-update",
"license": "MIT",
"authors": [{
"name": "Ramakant Gangwar",
Expand All @@ -36,7 +36,7 @@
},
"autoload": {
"psr-4": {
"Joy\\VoyagerImport\\": "src"
"Joy\\VoyagerBulkUpdate\\": "src"
},
"files": [
"src/helper.php"
Expand All @@ -48,14 +48,14 @@
},
"autoload-dev": {
"psr-4": {
"Joy\\VoyagerImport\\Tests\\": "tests"
"Joy\\VoyagerBulkUpdate\\Tests\\": "tests"
}
},
"extra": {
"laravel": {
"providers": [
"Joy\\VoyagerImport\\VoyagerImportServiceProvider",
"Joy\\VoyagerImport\\ImportServiceProvider"
"Joy\\VoyagerBulkUpdate\\VoyagerBulkUpdateServiceProvider",
"Joy\\VoyagerBulkUpdate\\ImportServiceProvider"
]
}
},
Expand Down
30 changes: 15 additions & 15 deletions config/voyager-import.php → config/voyager-bulk-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
return [

/*
* If enabled for voyager-import package.
* If enabled for voyager-bulk-update package.
*/
'enabled' => env('VOYAGER_IMPORT_ENABLED', true),
'enabled' => env('VOYAGER_BULK_UPDATE_ENABLED', true),

/*
* If validation enabled for voyager-import package.
* If validation enabled for voyager-bulk-update package.
*/
'validation' => env('VOYAGER_IMPORT_VALIDATION_ENABLED', false),
'validation' => env('VOYAGER_BULK_UPDATE_VALIDATION_ENABLED', false),

/*
| Here you can specify for which data type slugs import is enabled
Expand All @@ -19,7 +19,7 @@
|
*/

'allowed_slugs' => array_filter(explode(',', env('VOYAGER_IMPORT_ALLOWED_SLUGS', '*'))),
'allowed_slugs' => array_filter(explode(',', env('VOYAGER_BULK_UPDATE_ALLOWED_SLUGS', '*'))),

/*
| Here you can specify for which data type slugs import is not allowed
Expand All @@ -28,17 +28,17 @@
|
*/

'not_allowed_slugs' => array_filter(explode(',', env('VOYAGER_IMPORT_NOT_ALLOWED_SLUGS', ''))),
'not_allowed_slugs' => array_filter(explode(',', env('VOYAGER_BULK_UPDATE_NOT_ALLOWED_SLUGS', ''))),

/*
* The config_key for voyager-import package.
* The config_key for voyager-bulk-update package.
*/
'config_key' => env('VOYAGER_IMPORT_CONFIG_KEY', 'joy-voyager-import'),
'config_key' => env('VOYAGER_BULK_UPDATE_CONFIG_KEY', 'joy-voyager-bulk-update'),

/*
* The route_prefix for voyager-import package.
* The route_prefix for voyager-bulk-update package.
*/
'route_prefix' => env('VOYAGER_IMPORT_ROUTE_PREFIX', 'joy-voyager-import'),
'route_prefix' => env('VOYAGER_BULK_UPDATE_ROUTE_PREFIX', 'joy-voyager-bulk-update'),

/*
|--------------------------------------------------------------------------
Expand All @@ -50,29 +50,29 @@
*/

'controllers' => [
'namespace' => 'Joy\\VoyagerImport\\Http\\Controllers',
'namespace' => 'Joy\\VoyagerBulkUpdate\\Http\\Controllers',
],

/*
| The default import disk.
*/
'disk' => env('VOYAGER_IMPORT_DISK', null),
'disk' => env('VOYAGER_BULK_UPDATE_DISK', null),

/*
| The default import readerType.
|
| Supported: "Xlsx", "Csv", "Ods", "Xls",
| "Slk", "Xml", "Gnumeric", "Html"
*/
'readerType' => env('VOYAGER_IMPORT_READER_TYPE', 'Xlsx'),
'readerType' => env('VOYAGER_BULK_UPDATE_READER_TYPE', 'Xlsx'),

/*
| The default import writerType.
|
| Supported: "Xlsx", "Csv", "Csv", "Ods", "Xls",
| "Slk", "Xml", "Gnumeric", "Html"
*/
'writerType' => env('VOYAGER_IMPORT_WRITER_TYPE', 'Xlsx'),
'writerType' => env('VOYAGER_BULK_UPDATE_WRITER_TYPE', 'Xlsx'),

/*
| Here you can specify which mimes are allowed to upload
Expand All @@ -81,7 +81,7 @@
|
*/

'allowed_mimes' => env('VOYAGER_IMPORT_ALLOWED_MIMES', 'xlsx,txt,csv,tsv,ods,xls,slk,xml,gnumeric,html'),
'allowed_mimes' => env('VOYAGER_BULK_UPDATE_ALLOWED_MIMES', 'xlsx,txt,csv,tsv,ods,xls,slk,xml,gnumeric,html'),

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</include>
</coverage>
<testsuites>
<testsuite name="Joy VoyagerImport Test Suite">
<testsuite name="Joy VoyagerBulkUpdate Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
20 changes: 10 additions & 10 deletions resources/views/bread/import.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a class="btn btn-info" id="bulk_import_btn"><i class="voyager-upload"></i> <span>{{ __('joy-voyager-import::generic.bulk_import') }}</span></a>
<a class="btn btn-info" id="bulk_import_btn"><i class="voyager-upload"></i> <span>{{ __('joy-voyager-bulk-update::generic.bulk_import') }}</span></a>

{{-- Bulk import modal --}}
<div class="modal modal-info fade" tabindex="-1" id="bulk_import_modal" role="dialog">
Expand All @@ -9,7 +9,7 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
<h4 class="modal-title">
<i class="voyager-upload"></i> {{ __('joy-voyager-import::generic.bulk_import_title') }} <span id="bulk_import_count"></span> <span id="bulk_import_display_name"></span>
<i class="voyager-upload"></i> {{ __('joy-voyager-bulk-update::generic.bulk_import_title') }} <span id="bulk_import_count"></span> <span id="bulk_import_display_name"></span>
</h4>
</div>
<div class="modal-body" id="bulk_import_modal_body">
Expand All @@ -20,7 +20,7 @@
<div class="btn-group pull-left" role="group">
<div class="btn-group" role="group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="voyager-download"></i> <span>{{ __('joy-voyager-import::generic.bulk_import_template') }}</span>
<i class="voyager-download"></i> <span>{{ __('joy-voyager-bulk-update::generic.bulk_import_template') }}</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
Expand All @@ -29,7 +29,7 @@
class='export-template-by-writer'
data-writer-type="Xls"
href="{{ route('voyager.'.$dataType->slug.'.import-template') }}?writerType=Xls"
title="{{ __('joy-voyager-import::generic.bulk_import_template') }}"
title="{{ __('joy-voyager-bulk-update::generic.bulk_import_template') }}"
target="_blank"
>Xls</a>
</li>
Expand All @@ -38,7 +38,7 @@ class='export-template-by-writer'
class='export-template-by-writer'
data-writer-type="Xlsx"
href="{{ route('voyager.'.$dataType->slug.'.import-template') }}?writerType=Xlsx"
title="{{ __('joy-voyager-import::generic.bulk_import_template') }}"
title="{{ __('joy-voyager-bulk-update::generic.bulk_import_template') }}"
target="_blank"
>Xlsx</a>
</li>
Expand All @@ -47,7 +47,7 @@ class='export-template-by-writer'
class='export-template-by-writer'
data-writer-type="Ods"
href="{{ route('voyager.'.$dataType->slug.'.import-template') }}?writerType=Ods"
title="{{ __('joy-voyager-import::generic.bulk_import_template') }}"
title="{{ __('joy-voyager-bulk-update::generic.bulk_import_template') }}"
target="_blank"
>Ods</a>
</li>
Expand All @@ -56,7 +56,7 @@ class='export-template-by-writer'
class='export-template-by-writer'
data-writer-type="Csv"
href="{{ route('voyager.'.$dataType->slug.'.import-template') }}?writerType=Csv"
title="{{ __('joy-voyager-import::generic.bulk_import_template') }}"
title="{{ __('joy-voyager-bulk-update::generic.bulk_import_template') }}"
target="_blank"
>Csv</a>
</li>
Expand All @@ -65,7 +65,7 @@ class='export-template-by-writer'
class='export-template-by-writer'
data-writer-type="Html"
href="{{ route('voyager.'.$dataType->slug.'.import-template') }}?writerType=Html"
title="{{ __('joy-voyager-import::generic.bulk_import_template') }}"
title="{{ __('joy-voyager-bulk-update::generic.bulk_import_template') }}"
target="_blank"
>Html</a>
</li>
Expand All @@ -77,7 +77,7 @@ class='export-template-by-writer'
<!-- <input type="hidden" name="ids" value="" class="selected_ids"> -->
<!-- <input type="hidden" name="ids" id="bulk_import_input" value=""> -->
<input type="submit" class="btn btn-info pull-right import-confirm"
value="{{ __('joy-voyager-import::generic.bulk_import_confirm') }} {{ strtolower($dataType->getTranslatedAttribute('display_name_plural')) }}">
value="{{ __('joy-voyager-bulk-update::generic.bulk_import_confirm') }} {{ strtolower($dataType->getTranslatedAttribute('display_name_plural')) }}">
<button type="button" class="btn btn-default pull-right" data-dismiss="modal">
{{ __('voyager::generic.cancel') }}
</button>
Expand Down Expand Up @@ -122,7 +122,7 @@ class='export-template-by-writer'
$bulkImportModal.modal('show');
// } else {
// // No row selected
// toastr.warning('{{ __('joy-voyager-import::generic.bulk_import_nothing') }}');
// toastr.warning('{{ __('joy-voyager-bulk-update::generic.bulk_import_nothing') }}');
// }
});
});
Expand Down
6 changes: 3 additions & 3 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
|--------------------------------------------------------------------------
|
| This file is where you may override any of the routes that are included
| with VoyagerImport.
| with VoyagerBulkUpdate.
|
*/

Route::group(['as' => 'joy-voyager-import.'], function () {
Route::group(['as' => 'joy-voyager-bulk-update.'], function () {
// event(new Routing()); @deprecated

$namespacePrefix = '\\' . config('joy-voyager-import.controllers.namespace') . '\\';
$namespacePrefix = '\\' . config('joy-voyager-bulk-update.controllers.namespace') . '\\';

// event(new RoutingAfter()); @deprecated
});
4 changes: 2 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
|
*/

Route::group(['prefix' => config('joy-voyager-import.admin_prefix', 'admin')], function () {
Route::group(['prefix' => config('joy-voyager-bulk-update.admin_prefix', 'admin')], function () {
Route::group(['as' => 'voyager.'], function () {
// event(new Routing()); @deprecated

$namespacePrefix = '\\'.config('joy-voyager-import.controllers.namespace').'\\';
$namespacePrefix = '\\'.config('joy-voyager-bulk-update.controllers.namespace').'\\';

Route::group(['middleware' => 'admin.user'], function () use ($namespacePrefix) {
// event(new RoutingAdmin()); @deprecated
Expand Down
Loading

0 comments on commit 902aa19

Please sign in to comment.