This commit is contained in:
rahul shukla 2018-12-04 10:07:57 +05:30
commit bd1489dac6
20 changed files with 33205 additions and 52881 deletions

View File

@ -2,68 +2,246 @@
#### This changelog consists the bug & security fixes and new features being included in the releases listed below.
## **v0.1.2(30th of November, 2018)** - *Release*
* #185 - [fixed] Search not working in responsive mode
* #187 - [fixed] We can add column "Group Name" instead of Group Id and also add this column in filter in Customers Grid
* #247 - [fixed] Displaying wrong number of products and sales in category, on dashboard
* #207 - [fixed] Two button are not required to save address
* #119 - [fixed] Set value in the login form fields(on Demo)
* #245 - [fixed] Add Sales and Customers also in Custom Permission option of Access Control
* #126 - [fixed] Add asterisk symbol on SKU field
* #224 - [fixed] Status column in Invoice remains blank
* #192 - [fixed] Not able to checkout with different shipping address
* #188 - [fixed] Unable to delete Customer Group
* #151 - [fixed] Description and Short description field are throwing validation error message even if description is written
* #162 - [fixed] No response when click on "Add to Cart" for configurable product on home page and category page
* #180 - [fixed] Not accepting the code for Currency if it is already used in locales
* #121 - [fixed] buy now button is not working on index page for some products
* #134 - [fixed] Unable to login with the user account that is created in user grid with custom access
* #154 - [fixed] While creating channel Description field,Home Page Content and footer _content is required, but it doesn't throw any validation error if we leave that field blank
* #146 - [fixed] Tax is not added on product at checkout
* #161 - [fixed] Inappropriate validation message(System wide fix is applied for validation messages)
* #142 - [fixed] Correct the spelling of "default" in theme
* #165 - [fixed] If a Product is selected as disabled at time of creation,then also it is visible at store front
* #133 - [fixed] Add asterisk symbol for email field in Add User page
* #175 - [fixed] Getting exception in deleting attributes
* #165 - [feature] No grid is available in back-end to manage Newsletter
* #235 - [fixed] User name should display on account dropdown(In case of signed-in user)
* #200 - [fixed] Getting exception when applying filter on Exchange Rates grid
* #225 - [fixed] Slider button should display as clickable on mouse hover
* #148 - [fixed] Search Functionality is not working in all grid of Admin panel
* #216 - [added] Add a Column "Channel" to verify from which channel order has been placed and also add this column in filter
* #237 - [fixed] Incorrect response message after deleting product from wishlist
* #201 - [fixed] Getting exception when applying filter in slider
* #202 - [fixed] Correct the background text of filter field in Taxes grid.Text should be according to selected column(placeholder)
* #232 - [added] Add sorting functionality in column "Name" of Inventory Grid
* #230 - [added] Add Sorting functionality on column "Status" of Product Grid
* #229 - [added] Add sorting functionality on Column "Type" in Product Grid, so that product can be sorted according to type
* #244 - [fixed] Getting exception when applying sorting on Tax Rate
* #242 - [fixed] Confirmation message should be "Do you really want to edit this record?", on editing slider
* #236 - [fixed] Incorrect response message after removing a product from cart
* #206 - [fixed] Correct the confirmation message in pop-up when click on Edit User
* #174 - [fixed] Getting Exception while applying filter on category page
* #149 - [fixed] Getting exception in creating configurable product.
* #184 - [fixed] Product page mandatory fields are missing '*' or asterisk as failing to indicate required field and inappropriate validation message
* #162 - [fixed] No response when click on "Add to Cart" for configurable product on home page and category page
* #164 - [fixed] Loss of data from content field of Slider
* #166 - [fixed] Getting 404 error on deleting order
* #178 - [fixed] Change the Column Name
* #129 - [fixed] Getting issue when deleting orders.Mass action is not working in any grid(Getting Internal server error) while updating status(mass actions will return in next release and the issue will remain open till next release)
* #181 - [fixed] Change the column name in filter from "Target Currency" to "Currency Name"
* #172 - [fixed] Getting 500 Internal Server Error on updating Users
* #173 - [fixed] Getting 500 Internal Server Error on Updating taxes
* #177 - [fixed] Getting Exception when clicking on column locale
* #125 - [fixed] Delete button is not available for mass delete of Products in Product Grid(mass actions will return in next release and the issue will remain open till next release)
* #132 - [fixed] Issue in Mass Deletion.This issue exists for every grid(mass actions will return in next release and the issue will remain open till next release)
* #137 - [fixed] By default Gender is selected as Male for every customer
* #141 - [fixed] Subscribe button on storefront is unresponsive
* #145 - [fixed] Edit Functionality of Tax Categories is not Working
* #157 - [fixed] Old password check in edit profile ain't working for customers
* #120 - [fixed] After signup on the frontend, the customer is still not the signup page
* #139 - [fixed] Encountered exception while changing locale on storefront
* #144 - [fixed] "Move All Products To Cart" and "Delete All" link is not working in Wishlist grid(Move all products to cart is removed and delete all works now)
* #150 - [fixed] If currency changes on store front then on admin panel in Order Grid currency changes according to store front
* [fixes] More ACL added.
* [feature] Paypal integration.
* [feature] Newsletter subscription.
* [feature] Email Verification for customers.
* [feature] News letter grid for Admin.
## **v0.1.1(13th of November, 2018)** - *Release*
#94 - [fixed] Sign-in page shows signup text(@prashant-webkul)
* #94 - [fixed] Sign-in page shows signup text(@prashant-webkul)
#95 - [fixed] Buy Now Button does not work(@prashant-webkul)
* #95 - [fixed] Buy Now Button does not work(@prashant-webkul)
#96 - [fixed] Search button does not work(@prashant-webkul)
* #96 - [fixed] Search button does not work(@prashant-webkul)
**PR #118** - *List of the features and fixes covered:*
* #97 - [fixed] client side validation / js validation is missing at login page
* [fixed] Email templates logo issue fixed(@jitendra-webkul)
* [fixed] Front search issue fixed due to hardcoded attribute code in search criteria(@jitendra-webkul)
* [changed] Versioning of core packages
* [fixed] Buynow validation fixes(@jitendra-webkul)
* [feature] New action type added in datagrid
* [feature] Loader added in storefront product page
* [fixed] Tax rates and categories form fixes(@jitendra-webkul)
* [feature] Country state selector added where country and states were there originally in release v0.1.0
* [feature] Multiple addresses for customers with CRUD
* [feature] Customer can now make any of his/her existing address a default address
* [fixed] Customer address 2 form field validation required changed to optional(@jitendra-webkul)
* [fixed] Tax rates validation fixes for zip ranges(@prashant-webkul)
* [feature] Print invoice feature added.
* [changed] Core packages composer file parameter name changed from namespace webkul to bagisto
* [feature] Payment package added in core packages
* [feature] Sales module added in admin with orders, invoices and shipments with datagrid
* [feature] Functionality to indicate the new and featured product in the product's add and edit form
* [feature] Cart actions more faster in storefront
* [changed] Responsive styles refined and extended for checkout pages on storefront
* [fixed] Various UI/UX fixes in store front styles and layouts(@prashant-webkul & @jitendra-webkul)
* #98 - [fixed] No warning before removing the item from the cart
* #114 - [fixed] Invoice printing added as a feature
* [fixed] Email templates logo issue fixed(@jitendra-webkul)
* [fixed] Front search issue fixed due to hardcoded attribute code in search criteria(@jitendra-webkul)
* [changed] Versioning of core packages
* [fixed] Buynow validation fixes(@jitendra-webkul)
* [feature] New action type added in datagrid
* [feature] Loader added in storefront product page
* [fixed] Tax rates and categories form fixes(@jitendra-webkul)
* [feature] Country state selector added where country and states were there originally in release v0.1.0
* [feature] Multiple addresses for customers with CRUD
* [feature] Customer can now make any of his/her existing address a default address
* [fixed] Customer address 2 form field validation required changed to optional(@jitendra-webkul)
* [fixed] Tax rates validation fixes for zip ranges(@prashant-webkul)
* [changed] Core packages composer file parameter name changed from namespace webkul to bagisto
* [feature] Payment package added in core packages
* [feature] Sales module added in admin with orders, invoices and shipments with datagrid
* [feature] Functionality to indicate the new and featured product in the product's add and edit form
* [feature] Cart actions more faster in storefront
* [changed] Responsive styles refined and extended for checkout pages on storefront
* [fixed] Various UI/UX fixes in store front styles and layouts(@prashant-webkul & @jitendra-webkul)
## **v0.1.0(30th of October 2018)** - *First release*
**PR #117** - *List of the features and fixes covered:*
* [feature] Add and modify product with simple and configurable types
* [feature] Add and modify product with simple and configurable types
* [feature] Add and modify attributes and attribute families for creating products.
* [feature] Datagrid for all the major core resources added as index for listing core resources like product, attributes.
* [feature] Add and modify channels for creating multiple storefront.
* [feature] Add and modify categories to be displayed on storefront.
* [feature] Add and modify customers.
* [feature] Add and modify customer groups.
* [feature] Add and modify customer reviews for moderation by admin.
* [feature] Add and modify currently logged in admin user details.
* [feature] Add and modify locales for multiple languages support system wide.
* [feature] Add and modify currencies to be used in channels
* [feature] Add and modify currency exchange rate for the stores accepting multiple currencies or using multiple channels.
* [feature] Add and modify inventory sources with priority to hold products quantities in real time.
* [feature] Add and modify channels.
* [feature] Add and modify user from admins access with customer roles.
* [feature] Add and modify customer roles for users.
* [feature] Add and modify slider for storefront as a CMS capability.
* [feature] Add and modify tax categories and tax rates.
* [feature] Shopping cart in storefront
* [feature] Wishlist for customer
* [feature] Single address for customer
* [feature] Customer can see his reviews in his account section when logged in.
* [feature] Customer profile edit feature account section when logged in.
* [feature] Customer can view his orders in account section when logged in.
* [feature] Customer order notifications via mails.
* [feature] Multiple locales and currencies on storefront.
* [feature] Locale translations are stored as a separate file in shop and admin packages.
* [feature] Single page checkout system for checkout.
* [feature] Custom themes and assets provisioning included as a integrated package called "theme" in packages.
* [feature] Add and modify attributes and attribute families for creating products
* [feature] Datagrid for all the major core resources added as index for listing core resources like product, attributes
* [feature] Add and modify channels for creating multiple storefront
* [feature] Add and modify categories to be displayed on storefront
* [feature] Add and modify customers
* [feature] Add and modify customer groups
* [feature] Add and modify customer reviews for moderation by admin
* [feature] Add and modify currently logged in admin user details
* [feature] Add and modify locales for multiple languages support system wide
* [feature] Add and modify currencies to be used in channels
* [feature] Add and modify currency exchange rate for the stores accepting multiple currencies or using multiple channels
* [feature] Add and modify inventory sources with priority to hold products quantities in real time
* [feature] Add and modify channels
* [feature] Add and modify user from admins access with customer roles
* [feature] Add and modify customer roles for users
* [feature] Add and modify slider for storefront as a CMS capability
* [feature] Add and modify tax categories and tax rates
* [feature] Shopping cart in storefront
* [feature] Wishlist for customer
* [feature] Single address for customer
* [feature] Customer can see his reviews in his account section when logged in
* [feature] Customer profile edit feature account section when logged in
* [feature] Customer can view his orders in account section when logged in
* [feature] Customer order notifications via mails
* [feature] Multiple locales and currencies on storefront
* [feature] Locale translations are stored as a separate file in shop and admin packages
* [feature] Single page checkout system for checkout
* [feature] Custom themes and assets provisioning included as a integrated package called "theme" in packages

View File

@ -76,24 +76,18 @@ default.
### 4. Installation:
**1. Run the Command**
**Run these Commands Below**
~~~
php artisan migrate
~~~
**2. Run the Command**
~~~
php artisan db:seed
~~~
**3. Run the Command**
~~~
php artisan vendor:publish
-> Press 0 and then press enter to publish all assets and configurations.
~~~
**4. Run the Command**
```
php artisan storage:link
```
@ -110,7 +104,16 @@ php artisan storage:link
> **php artisan vendor:publish**
### 6. License
### 6. Migration from v0.1.1 to v0.1.2
**Run commands below:**
> **php artisan migrate**
> **php artisan vendor:publish**
### 7. License
Bagisto is a truly opensource E-Commerce framework which will always be free under the [MIT License](https://opensource.org/licenses/MIT).
### Coming Soon:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=463fcd59d49e91caa65c",
"/css/admin.css": "/css/admin.css?id=201f91bc553baa11139f"
}
"/js/admin.js": "/js/admin.js",
"/css/admin.css": "/css/admin.css"
}

View File

@ -111,7 +111,7 @@ class AttributeDataGrid
'name' => 'value_per_locale',
'alias' => 'attributeValuePerLocale',
'type' => 'string',
'label' => 'ValuePerLocale',
'label' => 'Locale based',
'sortable' => true,
'wrapper' => function ($value) {
if($value == 0)
@ -123,7 +123,7 @@ class AttributeDataGrid
'name' => 'value_per_channel',
'alias' => 'attributeValuePerChannel',
'type' => 'string',
'label' => 'ValuePerChannel',
'label' => 'Channel based',
'sortable' => true,
'wrapper' => function ($value) {
if($value == 0)

View File

@ -4,11 +4,11 @@ namespace Webkul\Admin\Exceptions;
use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Database\Eloquent\PDOException;
use Illuminate\Database\Eloquent\ErrorException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
@ -22,60 +22,38 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $exception)
{
$path = $this->isAdminUri() ? 'admin' : 'shop';
if ($exception instanceof HttpException) {
$statusCode = $exception->getStatusCode();
if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false) {
switch ($statusCode) {
case 404:
return response()->view('admin::errors.404', [], 404);
break;
case 403:
return response()->view('admin::errors.403', [], 403);
break;
case 401:
return response()->view('admin::errors.401', [], 401);
break;
default:
return response()->view('admin::errors.500', [], 500);
}
} else {
switch ($statusCode) {
case 404:
return response()->view('shop::errors.404', [], 404);
break;
case 403:
return response()->view('shop::errors.403', [], 403);
break;
case 401:
return response()->view('shop::errors.401', [], 401);
break;
default:
return response()->view('shop::errors.500', [], 500);
}
}
$statusCode = in_array($statusCode, [401, 403, 404]) ? $statusCode : 500;
return $this->response($path, $statusCode);
} else if ($exception instanceof ModelNotFoundException) {
if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
return response()->view('admin::errors.404', [], 404);
}else {
return response()->view('shop::errors.404', [], 404);
}
return $this->response($path, 404);
} else if ($exception instanceof PDOException) {
if (strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
return response()->view('admin::errors.500', [], 500);
} else {
return response()->view('shop::errors.500', [], 500);
}
return $this->response($path, 500);
}
// else if ($exception instanceof \ErrorException) {
// else if ($exception instanceof ErrorException) {
// if(strpos($_SERVER['REQUEST_URI'], 'admin') !== false){
// return response()->view('admin::errors.500', [], 500);
// }else {
// return response()->view('shop::errors.500', [], 500);
// }
// }
return parent::render($request, $exception);
}
private function isAdminUri()
{
return strpos($_SERVER['REQUEST_URI'], 'admin') !== false ? true : false;
}
private function response($path, $statusCode)
{
return response()->view("{$path}::errors.{$statusCode}", [], $statusCode);
}
}

View File

@ -211,6 +211,7 @@ class DashboardController extends Controller
->where('category_translations.locale', app()->getLocale())
->where('order_items.created_at', '>=', $this->startDate)
->where('order_items.created_at', '<=', $this->endDate)
->where('order_items.qty_ordered', '>', 0)
->addSelect(DB::raw('SUM(qty_ordered) as total_qty_ordered'))
->addSelect(DB::raw('COUNT(products.id) as total_products'))
->addSelect('order_items.id', 'categories.id as category_id', 'category_translations.name')

View File

@ -14,13 +14,12 @@
</div>
<div class="page-action">
<form method="POST" action="{{ route('admin.datagrid.export') }}">
@csrf()
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.customers.customers.export') }}
</button>
<input type="hidden" name="gridData" value="{{serialize($orderGrid)}}">
</form>
<div class="export">
<i class="export-icon"></i>
<span @click="showModal('downloadDataGrid')">
{{ __('admin::app.export.export') }}
</span>
</div>
</div>
</div>
@ -28,4 +27,55 @@
{!! $orderGrid->render() !!}
</div>
</div>
@stop
<modal id="downloadDataGrid" :is-open="modalIds.downloadDataGrid">
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
<div slot="body">
<export-form></export-form>
</div>
</modal>
@stop
@push('scripts')
<script type="text/x-template" id="export-form-template">
<form method="POST" action="{{ route('admin.datagrid.export') }}">
<div class="page-content">
<div class="form-container">
@csrf()
<input type="hidden" name="gridData" value="{{serialize($orderGrid)}}">
<div class="control-group">
<label for="format" class="required">
{{ __('admin::app.export.format') }}
</label>
<select name="format" class="control" v-validate="'required'">
<option value="xls">XLS</option>
<option value="csv">CSV</option>
</select>
</div>
</div>
</div>
<button type="submit" class="btn btn-lg btn-primary" @click="closeModal">
{{ __('admin::app.export.export') }}
</button>
</form>
</script>
<script>
Vue.component('export-form', {
template: '#export-form-template',
methods: {
closeModal () {
this.$parent.closeModal();
}
}
});
</script>
@endpush

View File

@ -14,13 +14,12 @@
</div>
<div class="page-action">
<form method="POST" action="{{ route('admin.datagrid.export') }}">
@csrf()
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.customers.customers.export') }}
</button>
<input type="hidden" name="gridData" value="{{serialize($orderShipmentsGrid)}}">
</form>
<div class="export">
<i class="export-icon"></i>
<span @click="showModal('downloadDataGrid')">
{{ __('admin::app.export.export') }}
</span>
</div>
</div>
</div>
@ -28,4 +27,55 @@
{!! $orderShipmentsGrid->render() !!}
</div>
</div>
@stop
<modal id="downloadDataGrid" :is-open="modalIds.downloadDataGrid">
<h3 slot="header">{{ __('admin::app.export.download') }}</h3>
<div slot="body">
<export-form></export-form>
</div>
</modal>
@stop
@push('scripts')
<script type="text/x-template" id="export-form-template">
<form method="POST" action="{{ route('admin.datagrid.export') }}">
<div class="page-content">
<div class="form-container">
@csrf()
<input type="hidden" name="gridData" value="{{serialize($orderShipmentsGrid)}}">
<div class="control-group">
<label for="format" class="required">
{{ __('admin::app.export.format') }}
</label>
<select name="format" class="control" v-validate="'required'">
<option value="xls">XLS</option>
<option value="csv">CSV</option>
</select>
</div>
</div>
</div>
<button type="submit" class="btn btn-lg btn-primary" @click="closeModal">
{{ __('admin::app.export.export') }}
</button>
</form>
</script>
<script>
Vue.component('export-form', {
template: '#export-form-template',
methods: {
closeModal () {
this.$parent.closeModal();
}
}
});
</script>
@endpush

View File

@ -4,6 +4,7 @@ namespace Webkul\Category\Models;
use Webkul\Core\Eloquent\TranslatableModel;
use Kalnoy\Nestedset\NodeTrait;
use Illuminate\Support\Facades\Storage;
class Category extends TranslatableModel
{
@ -12,4 +13,20 @@ class Category extends TranslatableModel
public $translatedAttributes = ['name', 'description', 'slug', 'meta_title', 'meta_description', 'meta_keywords'];
protected $fillable = ['position', 'status', 'parent_id'];
/**
* Get image url for the category image.
*/
public function image_url()
{
return Storage::url($this->image);
}
/**
* Get image url for the category image.
*/
public function getImageUrlAttribute()
{
return $this->image_url();
}
}

View File

@ -185,9 +185,7 @@ class Cart {
$result = $this->createItem($id, $data);
}
session()->flash('success', trans('shop::checkout.cart.success'));
return true;
return $result;
} else {
return $this->create($id, $data);
}
@ -696,11 +694,15 @@ class Cart {
*/
public function collectTotals()
{
$validated = $this->validateItems();
if(!$validated) {
return false;
}
if(!$cart = $this->getCart())
return false;
$this->validateItems();
$this->calculateItemsTax();
$cart->grand_total = $cart->base_grand_total = 0;
@ -745,11 +747,15 @@ class Cart {
{
$cart = $this->getCart();
if(!$cart) {
return false;
}
//rare case of accident-->used when there are no items.
if(count($cart->items) == 0) {
$this->cart->delete($cart->id);
return redirect()->route('shop.home.index');
return false;
} else {
$items = $cart->items;
@ -1082,6 +1088,10 @@ class Cart {
return $result;
} else {
$data['product'] = $id;
$data['is_configurable'] = false;
$data['quantity'] = 1;
$result = $this->add($id, $data);
return $result;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,4 @@
{
<<<<<<< HEAD
"/js/shop.js": "/js/shop.js",
"/css/shop.css": "/css/shop.css"
}
=======
<<<<<<< HEAD
"/js/shop.js": "/js/shop.js",
"/css/shop.css": "/css/shop.css"
}
=======
"/js/shop.js": "/js/shop.js?id=c6ba9f43bd31f175a665",
"/css/shop.css": "/css/shop.css?id=2a9e3addb8dd8df86f03"
}
>>>>>>> 2a2b1e8ec4f3e110fca0b4926f090ed506b81ce5
>>>>>>> master
"/css/shop.css": "/css/shop.css?id=7a26e71f61912d56b0fa"
}

View File

@ -91,7 +91,7 @@ class CartController extends Controller
if($result) {
session()->flash('success', trans('shop::app.checkout.cart.item.success'));
} else {
session()->flash('success', trans('shop::app.checkout.cart.item.error-add'));
session()->flash('warning', trans('shop::app.checkout.cart.item.error-add'));
}
Cart::collectTotals();

View File

@ -911,7 +911,7 @@ section.slider-block {
}
.dropdown-content .item-details{
height: 75px;
max-height: 125px;
}
.item-details .item-name {

View File

@ -20,17 +20,8 @@
<div class="category-block">
<div class="hero-image mb-35">
@if(!is_null($category->image))
<?php
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
if(request()->getHttpHost() == 'localhost') {
$src=$protocol. request()->getHttpHost().'/bagisto/public/storage/'.$category->image;
}else {
$src=$protocol. request()->getHttpHost().'/storage/'.$category->image;
}
?>
<img class="logo" src="{{ $src }}" />
<img class="logo" src="{{ $category->image_url }}" />
@endif
</div>

View File

@ -1,8 +1,8 @@
const { mix } = require("laravel-mix");
require("laravel-mix-merge-manifest");
// var publicPath = 'publishable/assets';
var publicPath = "../../../public/themes/default/assets";
var publicPath = 'publishable/assets';
// var publicPath = "../../../public/themes/default/assets";
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();

View File

@ -144,21 +144,22 @@ class TaxCategoryController extends Controller
]);
$data = request()->input();
$taxCategory = $this->taxCategory->update($data, $id);
if($taxCategory = $this->taxCategory->update($data, $id)) {
$taxRates = $data['taxrates'];
//attach the categories in the tax map table
$this->taxCategory->attachOrDetach($taxCategory, $taxRates);
session()->flash('success', trans('admin::app.settings.tax-categories.update-success'));
return redirect()->route($this->_config['redirect']);
} else {
if(!$taxCategory) {
session()->flash('error', trans('admin::app.settings.tax-categories.update-error'));
return redirect()->back();
}
$taxRates = $data['taxrates'];
//attach the categories in the tax map table
$this->taxCategory->attachOrDetach($taxCategory, $taxRates);
session()->flash('success', trans('admin::app.settings.tax-categories.update-success'));
return redirect()->route($this->_config['redirect']);
}
/**
@ -179,4 +180,4 @@ class TaxCategoryController extends Controller
return redirect()->back();
}
}
}