diff --git a/CHANGELOG for v0.1.x.md b/CHANGELOG for v0.1.x.md index f17f22b70..adb934414 100644 --- a/CHANGELOG for v0.1.x.md +++ b/CHANGELOG for v0.1.x.md @@ -4,6 +4,14 @@ ## **v0.1.2(30th of November, 2018)** - *Release* +* [feature] Paypal integration for online payments + +* [feature] Newsletter subscription + +* [feature] Email Verification for customers + +* [feature] News letter grid for Admin + * #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 @@ -126,14 +134,6 @@ * [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* diff --git a/README.md b/README.md index 435b4608f..808604b81 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/config/jwt.php b/config/jwt.php deleted file mode 100644 index f83b6f796..000000000 --- a/config/jwt.php +++ /dev/null @@ -1,173 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - - /* - |-------------------------------------------------------------------------- - | JWT Authentication Secret - |-------------------------------------------------------------------------- - | - | Don't forget to set this, as it will be used to sign your tokens. - | A helper command is provided for this: `php artisan jwt:generate` - | - */ - - 'secret' => env('JWT_SECRET', 'changeme'), - - /* - |-------------------------------------------------------------------------- - | JWT time to live - |-------------------------------------------------------------------------- - | - | Specify the length of time (in minutes) that the token will be valid for. - | Defaults to 1 hour - | - */ - - 'ttl' => env('JWT_TTL', 120), - - /* - |-------------------------------------------------------------------------- - | Refresh time to live - |-------------------------------------------------------------------------- - | - | Specify the length of time (in minutes) that the token can be refreshed - | within. I.E. The user can refresh their token within a 2 week window of - | the original token being created until they must re-authenticate. - | Defaults to 2 weeks - | - */ - - 'refresh_ttl' => env('JWT_REFRESH_TTL', 86400), - - /* - |-------------------------------------------------------------------------- - | JWT hashing algorithm - |-------------------------------------------------------------------------- - | - | Specify the hashing algorithm that will be used to sign the token. - | - | See here: https://github.com/namshi/jose/tree/2.2.0/src/Namshi/JOSE/Signer - | for possible values - | - */ - - 'algo' => 'HS256', - - /* - |-------------------------------------------------------------------------- - | User Model namespace - |-------------------------------------------------------------------------- - | - | Specify the full namespace to your User model. - | e.g. 'Acme\Entities\User' - | - */ - - 'user' => 'App\User', - - /* - |-------------------------------------------------------------------------- - | User identifier - |-------------------------------------------------------------------------- - | - | Specify a unique property of the user that will be added as the 'sub' - | claim of the token payload. - | - */ - - 'identifier' => 'id', - - /* - |-------------------------------------------------------------------------- - | Required Claims - |-------------------------------------------------------------------------- - | - | Specify the required claims that must exist in any token. - | A TokenInvalidException will be thrown if any of these claims are not - | present in the payload. - | - */ - - 'required_claims' => ['iss', 'iat', 'exp', 'nbf', 'sub', 'jti'], - - /* - |-------------------------------------------------------------------------- - | Blacklist Enabled - |-------------------------------------------------------------------------- - | - | In order to invalidate tokens, you must have the blacklist enabled. - | If you do not want or need this functionality, then set this to false. - | - */ - - 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true), - - /* - |-------------------------------------------------------------------------- - | Providers - |-------------------------------------------------------------------------- - | - | Specify the various providers used throughout the package. - | - */ - - 'providers' => [ - - /* - |-------------------------------------------------------------------------- - | User Provider - |-------------------------------------------------------------------------- - | - | Specify the provider that is used to find the user based - | on the subject claim - | - */ - - 'user' => 'Tymon\JWTAuth\Providers\User\EloquentUserAdapter', - - /* - |-------------------------------------------------------------------------- - | JWT Provider - |-------------------------------------------------------------------------- - | - | Specify the provider that is used to create and decode the tokens. - | - */ - - 'jwt' => 'Tymon\JWTAuth\Providers\JWT\Namshi', - - /* - |-------------------------------------------------------------------------- - | Authentication Provider - |-------------------------------------------------------------------------- - | - | Specify the provider that is used to authenticate users. - | - */ - - 'auth' => 'Tymon\JWTAuth\Providers\Auth\Illuminate', - - /* - |-------------------------------------------------------------------------- - | Storage Provider - |-------------------------------------------------------------------------- - | - | Specify the provider that is used to store tokens in the blacklist - | - */ - - 'storage' => 'Tymon\JWTAuth\Providers\Storage\Illuminate' - - ], - -]; diff --git a/config/test.php b/config/test.php deleted file mode 100644 index c205929e6..000000000 --- a/config/test.php +++ /dev/null @@ -1,5 +0,0 @@ - 'Test' -]; diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php index df980d7ca..110bbdb0a 100644 --- a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php @@ -32,23 +32,23 @@ class AttributeDataGrid 'aliased' => true, 'massoperations' => [ - // [ - // 'route' => route('admin.datagrid.delete'), - // 'method' => 'DELETE', - // 'label' => 'Delete', - // 'type' => 'button', - // ], + [ + 'route' => route('admin.catalog.attributes.massdelete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ] ], 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.attributes.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.attributes.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], @@ -57,7 +57,6 @@ class AttributeDataGrid 'join' => [], //use aliasing on secodary columns if join is performed - 'columns' => [ [ 'name' => 'id', diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php index 2bf1bae1c..4a3666297 100644 --- a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php @@ -44,12 +44,12 @@ class AttributeFamilyDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.families.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.families.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php index 7cc12f244..87f7d0015 100644 --- a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php @@ -44,12 +44,12 @@ class CategoryDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.categories.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.categories.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index 7c6c03280..9367d6cd1 100644 --- a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -44,12 +44,12 @@ class ChannelDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.channels.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.channels.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php index 8d08c4f15..08238339d 100644 --- a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php @@ -24,7 +24,7 @@ class CurrencyDataGrid public function createCurrencyDataGrid() { - return DataGrid::make([ + return DataGrid::make([ 'name' => 'Currencies', 'table' => 'currencies', 'select' => 'id', @@ -32,23 +32,23 @@ class CurrencyDataGrid 'aliased' => false, //use this with false as default and true in case of joins 'massoperations' =>[ - // [ - // 'route' => route('admin.datagrid.delete'), - // 'method' => 'DELETE', - // 'label' => 'Delete', - // 'type' => 'button', - // ], + [ + 'route' => route('admin.currencies.massdelete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ] ], 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to edit this record?', + 'route' => 'admin.currencies.edit', + // 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.currencies.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], @@ -65,9 +65,7 @@ class CurrencyDataGrid ], //use aliasing on secodary columns if join is performed - 'columns' => [ - [ 'name' => 'id', 'alias' => 'currencyId', diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php index 960103f1c..2931adb2e 100644 --- a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php @@ -31,23 +31,23 @@ class CustomerDataGrid 'aliased' => true, //use this with false as default and true in case of joins 'massoperations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', //select || button only - ], + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', //select || button only + // ], ], 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.customer.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.customer.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php index 6ce3070ff..8b0ba3407 100644 --- a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php @@ -53,13 +53,13 @@ class CustomerGroupDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.groups.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.groups.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php similarity index 94% rename from packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php rename to packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php index 0e7bfb76b..eedb654f5 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductReviewDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php @@ -7,13 +7,13 @@ use Webkul\Ui\DataGrid\Facades\DataGrid; /** - * Review DataGrid + * CustomerReview DataGrid * * @author Rahul Shukla @rahul-webkul * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ -class ProductReviewDataGrid +class CustomerReviewDataGrid { /** * The ProductReviewDataGrid @@ -23,7 +23,7 @@ class ProductReviewDataGrid * for Reviews */ - public function createProductReviewDataGrid() + public function createCustomerReviewDataGrid() { return DataGrid::make([ @@ -45,12 +45,12 @@ class ProductReviewDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.customer.review.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.customer.review.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], @@ -176,6 +176,6 @@ class ProductReviewDataGrid public function render() { - return $this->createProductReviewDataGrid()->render(); + return $this->createCustomerReviewDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php index 5f2db32b8..b39861f8d 100644 --- a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php @@ -44,12 +44,12 @@ class ExchangeRatesDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.exchange_rates.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.exchange_rates.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php index ca40fe7b6..ae4945cf2 100644 --- a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php @@ -42,12 +42,12 @@ class InventorySourcesDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.edit'), + 'route' => 'admin.inventory_sources.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.inventory_sources.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index 60dc9444a..ec67ce1a2 100644 --- a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -43,12 +43,12 @@ class LocalesDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to edit this record?', + 'route' => 'admin.locales.edit', + // 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.locales.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php b/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php index dc94780b2..499916a2c 100644 --- a/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php @@ -42,8 +42,13 @@ class NewsLetterDataGrid 'actions' => [ [ + 'type' => 'Edit', + 'route' => 'admin.customers.subscribers.edit', + // 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.customers.subscribers.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php index 59674fd0b..0ce7ad8ae 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php @@ -43,9 +43,10 @@ class OrderDataGrid 'actions' => [ [ 'type' => 'View', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to view this record?', - 'icon' => 'icon pencil-lg-icon', + 'route' => 'admin.sales.orders.view', + // 'confirm_text' => 'Do you really want to view this record?', + 'icon' => 'icon eye-icon', + 'icon-alt' => 'View' ], // [ // 'type' => 'Delete', diff --git a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php index 25aaf8853..ea8ce0a30 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php @@ -42,16 +42,11 @@ class OrderInvoicesDataGrid 'actions' => [ [ 'type' => 'View', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to view this record?', - 'icon' => 'icon pencil-lg-icon', + 'route' => 'admin.sales.invoices.view', + // 'confirm_text' => 'Do you really want to view this record?', + 'icon' => 'icon eye-icon', + 'icon-alt' => 'View' ], - // [ - // 'type' => 'Delete', - // 'route' => route('admin.datagrid.delete'), - // 'confirm_text' => 'Do you really want to do this?', - // 'icon' => 'icon trash-icon', - // ] ], 'join' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php index 51b3b0c70..06fa62af3 100644 --- a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php @@ -42,9 +42,10 @@ class OrderShipmentsDataGrid 'actions' => [ [ 'type' => 'View', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to view this record?', - 'icon' => 'icon pencil-lg-icon', + 'route' => 'admin.sales.shipments.view', + // 'confirm_text' => 'Do you really want to view this record?', + 'icon' => 'icon eye-icon', + 'icon-alt' => 'View' ], ], diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index 28b3f86fd..868400c75 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -36,12 +36,12 @@ class ProductDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.products.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.catalog.products.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php index 82fdf957d..8bdcf5155 100644 --- a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php @@ -44,15 +44,10 @@ class RolesDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.roles.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', - ], [ - 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to delete this record?', - 'icon' => 'icon trash-icon', - ], + ] ], 'join' => [ diff --git a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index 0a4b9cfd2..211115e3e 100644 --- a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -43,12 +43,12 @@ class SliderDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.sliders.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.sliders.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php index f4eef1910..87410cf03 100644 --- a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php @@ -53,13 +53,13 @@ class TaxCategoryDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.tax-categories.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.tax-categories.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php index d6f8eb1c7..a95fe3414 100644 --- a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php @@ -52,13 +52,13 @@ class TaxRateDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.tax-rates.store', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.tax-rates.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php index d8cfe0b45..b35088047 100644 --- a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php @@ -55,13 +55,13 @@ class UserDataGrid 'actions' => [ [ 'type' => 'Edit', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.users.edit', 'confirm_text' => 'Do you really want to edit this record?', 'icon' => 'icon pencil-lg-icon', ], [ 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), + 'route' => 'admin.users.delete', 'confirm_text' => 'Do you really want to delete this record?', 'icon' => 'icon trash-icon', ], diff --git a/packages/Webkul/Admin/src/Exceptions/Handler.php b/packages/Webkul/Admin/src/Exceptions/Handler.php index 4a6d2d88f..109c25392 100644 --- a/packages/Webkul/Admin/src/Exceptions/Handler.php +++ b/packages/Webkul/Admin/src/Exceptions/Handler.php @@ -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); - } - } - } 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); - } - } 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); - } + $statusCode = in_array($statusCode, [401, 403, 404]) ? $statusCode : 500; + return $this->response($path, $statusCode); + } else if ($exception instanceof ModelNotFoundException) { + return $this->response($path, 404); + } else if ($exception instanceof PDOException) { + 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); + } + } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerGroupController.php b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerGroupController.php index 7f1125d77..f6b4a6dcf 100644 --- a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerGroupController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerGroupController.php @@ -75,7 +75,11 @@ class CustomerGroupController extends Controller 'name' => 'string|required', ]); - $this->customerGroup->create(request()->all()); + $data = request()->all(); + + $data['is_user_defined'] = 1; + + $this->customerGroup->create($data); session()->flash('success', 'Customer Group created successfully.'); @@ -123,14 +127,14 @@ class CustomerGroupController extends Controller */ public function destroy($id) { - $group = $this->customerGroup->findOneWhere(['id'=>$id]); + $group = $this->customerGroup->findOneByField('id', $id); - if(!$group->is_user_defined) { - session()->flash('error', 'This Customer Group can not be deleted'); + if($group->is_user_defined == 0) { + session()->flash('warning', 'Cannot delete the default group'); } else { - $this->customerGroup->delete($id); + session()->flash('success', 'Customer Group deleted successfully'); - session()->flash('success', 'Customer Group deleted successfully.'); + $this->customerGroup->delete($id); } return redirect()->back(); diff --git a/packages/Webkul/Admin/src/Http/Controllers/DataGridController.php b/packages/Webkul/Admin/src/Http/Controllers/DataGridController.php index d0aa132f3..8ffcb9388 100644 --- a/packages/Webkul/Admin/src/Http/Controllers/DataGridController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/DataGridController.php @@ -11,172 +11,16 @@ use Webkul\Ui\DataGrid\Facades\DataGrid; * DataGrid controller * * @author Nikhil Malik @ysmnikhil + * @author Prashant Singh @prashant-webkul * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ class DataGridController extends Controller { - - /** - * Display a listing of the resource. - * - * @return \Illuminate\Http\Response - */ - public function index() - { - DataGrid::make([ - 'name' => 'Admin Datagrid', - 'table' => 'admins as u', - 'select' => 'u.id', - 'aliased' => true , //boolean to validate aliasing on the basis of this. - 'perpage' => 2, - 'filterable' => [ - [ - 'column' => 'u.id', - 'type' => 'integer', - 'label' => 'Admin ID' - ], [ - 'column' => 'u.email', - 'type' => 'string', - 'label' => 'Admin Email', - ], [ - 'column' => 'u.name', - 'type' => 'string', - 'label' => 'Admin Name', - ] - ], - 'searchables' =>[ - [ - 'name' => 'u.id', - 'label' => 'ID', - 'label' => 'Admin ID', - ], - [ - 'name' => 'u.name', - 'label' => 'Name', - 'label' => 'Admin Name', - ] - ], - 'join' => [ - [ - 'join' => 'leftjoin', - 'table' => 'roles as r', - 'primaryKey' => 'u.role_id', - 'condition' => '=', - 'secondaryKey' => 'r.id', - ] - ], - 'columns' => [ - [ - 'name' => 'u.id', - 'type' => 'string', - 'label' => 'Admin ID', - 'sortable' => true, - 'filterable' => true - ], - [ - 'name' => 'u.email', - 'type' => 'string', - 'label' => 'Admin Email', - 'sortable' => true, - 'filterable' => true - ], - [ - 'name' => 'u.name', - 'type' => 'string', - 'label' => 'Admin Name', - 'sortable' => true, - 'filterable' => true, - // will create on run time query - // 'filter' => [ - // 'function' => 'orwhere', // orwhere - // 'condition' => ['name', 'like', 'u'] // multiarray - // ], - 'attributes' => [ - 'class' => 'class-a class-b', - 'data-attr' => 'whatever you want', - 'onclick' => "window.alert('alert from datagrid column')" - ], - 'wrapper' => function ($value, $object) { - return '' . $object->name . ''; - }, - ], - [ - 'name' => 'r.name as x', - 'type' => 'string', - 'label' => 'Admin\'s Role', - 'sortable' => true, - 'filterable' => true, - ], - [ - 'name' => 'r.id as xx', - 'type' => 'integer', - 'label' => 'Role ID', - 'sortable' => false, - 'filterable' => false - ], - ], - - 'operators' => [ - 'eq' => "=", - 'lt' => "<", - 'gt' => ">", - 'lte' => "<=", - 'gte' => ">=", - 'neqn' => "!=", - 'ceq' => "<=>", - 'like' => "like", - 'nlike' => "not like", - ], - 'mass_operations' =>[ - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button', - - ] - ], - // 'css' => [] - - ]); - $result = DataGrid::render(); - return $result; + public function massDelete() { + dd(request()->all()); } - //for performing mass actions - public function massAction() - { - $make = [ - 'operations' =>[ - // [ - // 'route' => 'datagrid/update', - // 'method' => 'post', - // 'label' => 'Update', - // 'type' => 'select', - // 'name' => 'status', - // 'values' => [ - // [ - // 'label' => 'Enable', - // 'value' => 1 - // ], [ - // 'label' => 'Disable', - // 'value' => 0 - // ] - // ], - // ], - [ - 'route' => route('admin.datagrid.delete'), - 'method' => 'DELETE', - 'label' => 'Delete', - 'type' => 'button' - ] - ] - ]; - $result = DataGrid::makeMassAction($make); - } - - public function massDelete(Request $r) - { - return $r; + public function massUpdate() { + dd(request()->all()); } } diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index 710ea06f1..a499d25b2 100644 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -7,11 +7,11 @@ Route::group(['middleware' => ['web']], function () { 'view' => 'admin::users.sessions.create' ])->name('admin.session.create'); + //login post route to admin auth controller Route::post('/login', 'Webkul\User\Http\Controllers\SessionController@store')->defaults('_config', [ 'redirect' => 'admin.dashboard.index' ])->name('admin.session.store'); - // Forget Password Routes Route::get('/forget-password', 'Webkul\User\Http\Controllers\ForgetPasswordController@create')->defaults('_config', [ 'view' => 'admin::users.forget-password.create' @@ -19,7 +19,6 @@ Route::group(['middleware' => ['web']], function () { Route::post('/forget-password', 'Webkul\User\Http\Controllers\ForgetPasswordController@store')->name('admin.forget-password.store'); - // Reset Password Routes Route::get('/reset-password/{token}', 'Webkul\User\Http\Controllers\ResetPasswordController@create')->defaults('_config', [ 'view' => 'admin::users.reset-password.create' @@ -36,13 +35,11 @@ Route::group(['middleware' => ['web']], function () { 'redirect' => 'admin.session.create' ])->name('admin.session.destroy'); - // Dashboard Route Route::get('dashboard', 'Webkul\Admin\Http\Controllers\DashboardController@index')->defaults('_config', [ 'view' => 'admin::dashboard.index' ])->name('admin.dashboard.index'); - //Customers Management Routes Route::get('customers', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@index')->defaults('_config', [ 'view' => 'admin::customers.index' @@ -250,6 +247,7 @@ Route::group(['middleware' => ['web']], function () { Route::get('/attributes/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@destroy')->name('admin.catalog.attributes.delete'); + Route::delete('/attributes/massdelete', 'Webkul\Attribute\Http\Controllers\AttributeController@massDestroy')->name('admin.catalog.attributes.massdelete'); // Catalog Family Routes Route::get('/families', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@index')->defaults('_config', [ @@ -275,17 +273,6 @@ Route::group(['middleware' => ['web']], function () { Route::get('/families/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@destroy')->name('admin.catalog.families.delete'); }); - - // Datagrid Routes - - //for datagrid and its loading, filtering, sorting and queries - Route::get('datagrid', 'Webkul\Admin\Http\Controllers\DataGridController@index')->name('admin.datagrid.index'); - - Route::any('datagrid/massaction/delete', 'Webkul\Admin\Http\Controllers\DataGridController@massDelete')->name('admin.datagrid.delete'); - - Route::any('datagrid/massaction/edit','Webkul\Admin\Http\Controllers\DataGridController@massUpdate')->name('admin.datagrid.edit'); - - // User Routes Route::get('/users', 'Webkul\User\Http\Controllers\UserController@index')->defaults('_config', [ 'view' => 'admin::users.users.index' @@ -379,6 +366,8 @@ Route::group(['middleware' => ['web']], function () { Route::get('/currencies/delete/{id}', 'Webkul\Core\Http\Controllers\CurrencyController@destroy')->name('admin.currencies.delete'); + Route::any('/currencies/massdelete', 'Webkul\Core\Http\Controllers\CurrencyController@massDestroy')->name('admin.currencies.massdelete'); + // Exchange Rates Routes Route::get('/exchange_rates', 'Webkul\Core\Http\Controllers\ExchangeRateController@index')->defaults('_config', [ @@ -476,11 +465,19 @@ Route::group(['middleware' => ['web']], function () { // Admin Store Front Settings Route Route::get('/subscribers','Webkul\Core\Http\Controllers\SubscriptionController@index')->defaults('_config',[ - 'view' => 'admin::settings.subscribers.index' - ])->name('admin.subscribers.index'); + 'view' => 'admin::customers.subscribers.index' + ])->name('admin.customers.subscribers.index'); //destroy a newsletter subscription item - Route::get('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy'); + Route::get('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy')->name('admin.customers.subscribers.delete'); + + Route::get('subscribers/edit/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@edit')->defaults('_config', [ + 'view' => 'admin::customers.subscribers.edit' + ])->name('admin.customers.subscribers.edit'); + + Route::put('subscribers/update/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@update')->defaults('_config', [ + 'redirect' => 'admin.customers.subscribers.index' + ])->name('admin.customers.subscribers.update'); //slider index Route::get('/slider','Webkul\Shop\Http\Controllers\SliderController@index')->defaults('_config',[ @@ -508,7 +505,7 @@ Route::group(['middleware' => ['web']], function () { ])->name('admin.sliders.update'); //destroy a slider item - Route::get('slider/delete/{id}', 'Webkul\Shop\Http\Controllers\SliderController@destroy'); + Route::get('slider/delete/{id}', 'Webkul\Shop\Http\Controllers\SliderController@destroy')->name('admin.sliders.delete'); //tax routes Route::get('/tax-categories', 'Webkul\Tax\Http\Controllers\TaxController@index')->defaults('_config', [ diff --git a/packages/Webkul/Admin/src/Providers/EventServiceProvider.php b/packages/Webkul/Admin/src/Providers/EventServiceProvider.php index 0e2283949..250775776 100644 --- a/packages/Webkul/Admin/src/Providers/EventServiceProvider.php +++ b/packages/Webkul/Admin/src/Providers/EventServiceProvider.php @@ -96,6 +96,12 @@ class EventServiceProvider extends ServiceProvider 'route' => 'admin.customer.review.index', 'sort' => 3, 'icon-class' => '', + ], [ + 'key' => 'customers.subscribers', + 'name' => 'Newsletter Subscription', + 'route' => 'admin.customers.subscribers.index', + 'sort' => 4, + 'icon-class' => '', ], [ 'key' => 'configuration', 'name' => 'Configure', @@ -200,13 +206,7 @@ class EventServiceProvider extends ServiceProvider 'route' => 'admin.tax-rates.index', 'sort' => 2, 'icon-class' => '', - ], [ - 'key' => 'settings.subscribers', - 'name' => 'Newsletter Subscription', - 'route' => 'admin.subscribers.index', - 'sort' => 9, - 'icon-class' => '', - ], + ] ]; /** diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 5eeb27264..3ea85928f 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -2,9 +2,11 @@ return [ 'common' => [ - 'no-result-found' => 'We couldn\'t find any records.', + 'no-result-found' => 'We could not find any records.', 'country' => 'Country', - 'state' => 'State' + 'state' => 'State', + 'true' => 'True', + 'false' => 'False' ], 'dashboard' => [ 'title' => 'Dashboard', @@ -27,6 +29,15 @@ return [ 'stock-threshold' => 'Stock Threshold', 'qty-left' => ':qty Left', ], + + 'datagrid' => [ + 'mass-ops' => [ + 'method-error' => 'Error! Wrong method detected, please check mass action configuration', + 'delete-success' => 'Selected index of :resource were successfully deleted', + 'partial-action' => 'Some actions were not performed due restricted system constraints on :resource' + ] + ], + 'account' => [ 'title' => 'My Account', 'save-btn-title' => 'Save', @@ -498,10 +509,6 @@ return [ 'update-error' => 'Error! Tax Rate Cannot Be Updated', 'delete' => 'Tax Rate Deleted Successfully', 'atleast-one' => 'Cannot Delete Last Tax Rate' - ], - - 'subscribers' => [ - 'title' => 'News Letter Subscribers' ] ], @@ -540,6 +547,15 @@ return [ 'rating' => 'Rating', 'status' => 'Status', 'comment' => 'Comment' + ], + 'subscribers' => [ + 'title' => 'News Letter Subscribers', + 'title-edit' => 'Edit News Letter Subscriber', + 'email' => 'Email', + 'is_subscribed' => 'Subscribed', + 'edit-btn-title' => 'Update Subscriber', + 'update-success' => 'You updated subscriber', + 'update-failed' => 'Error! You cannot unsubscribed the subscriber' ] ], diff --git a/packages/Webkul/Admin/src/Resources/views/customers/review/index.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/review/index.blade.php index 487788ef2..b05f5f819 100644 --- a/packages/Webkul/Admin/src/Resources/views/customers/review/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/review/index.blade.php @@ -19,7 +19,7 @@
- @inject('review','Webkul\Admin\DataGrids\ProductReviewDataGrid') + @inject('review','Webkul\Admin\DataGrids\CustomerReviewDataGrid') {!! $review->render() !!}
diff --git a/packages/Webkul/Admin/src/Resources/views/customers/subscribers/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/subscribers/edit.blade.php new file mode 100644 index 000000000..5769a35a2 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/customers/subscribers/edit.blade.php @@ -0,0 +1,43 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.customers.subscribers.title-edit') }} +@stop + +@section('content') + +
+
+ + @csrf + @method('PUT') + +
+ + + @{{ errors.first('email') }} +
+ +
+ + + + + @{{ errors.first('is_subscribed') }} +
+
+
+@endsection \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/settings/subscribers/index.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/subscribers/index.blade.php similarity index 73% rename from packages/Webkul/Admin/src/Resources/views/settings/subscribers/index.blade.php rename to packages/Webkul/Admin/src/Resources/views/customers/subscribers/index.blade.php index 148538b95..a8863220f 100644 --- a/packages/Webkul/Admin/src/Resources/views/settings/subscribers/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/subscribers/index.blade.php @@ -1,7 +1,7 @@ @extends('admin::layouts.content') @section('page_title') - {{ __('admin::app.settings.subscribers.title') }} + {{ __('admin::app.customers.subscribers.title') }} @stop @section('content') @@ -10,12 +10,12 @@
diff --git a/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php b/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php index 0572aecbb..8adc8b98b 100644 --- a/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php @@ -42,6 +42,8 @@ window.flashMessages = [{'type': 'alert-warning', 'message': "{{ $warning }}" }]; @elseif($error = session('error')) window.flashMessages = [{'type': 'alert-error', 'message': "{{ $error }}" }]; + @elseif($info = session('info')) + window.flashMessages = [{'type': 'alert-error', 'message': "{{ $info }}" }]; @endif window.serverErrors = []; diff --git a/packages/Webkul/Admin/src/Resources/views/sales/invoices/index.blade.php b/packages/Webkul/Admin/src/Resources/views/sales/invoices/index.blade.php index 038e4812b..ddd7fed5a 100644 --- a/packages/Webkul/Admin/src/Resources/views/sales/invoices/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/sales/invoices/index.blade.php @@ -5,7 +5,7 @@ @stop @section('content') -
+