diff --git a/composer.json b/composer.json index 7d8d5294b..48d0cd2dd 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "laravel/framework": "5.6.*", "laravel/tinker": "^1.0", "nwidart/laravel-modules": "^3.2", + "prettus/l5-repository": "^2.6", "propaganistas/laravel-intl": "^2.0" }, "require-dev": { @@ -34,7 +35,6 @@ "webkul/laravel-attribute": "self.version", "webkul/laravel-customer": "self.version", "webkul/laravel-category": "self.version", - "webkul/laravel-channel": "self.version", "webkul/laravel-product": "self.version", "webkul/laravel-shop": "self.version", "webkul/laravel-theme": "self.version" @@ -54,7 +54,6 @@ "Webkul\\Shop\\": "packages/Webkul/Shop/src", "Webkul\\Core\\": "packages/Webkul/Core/src", "Webkul\\Customer\\": "packages/Webkul/Customer/src", - "Webkul\\Channel\\": "packages/Webkul/Channel/src", "Webkul\\Inventory\\": "packages/Webkul/Inventory/src", "Webkul\\Product\\": "packages/Webkul/Product/src", "Webkul\\Theme\\": "packages/Webkul/Theme/src" diff --git a/composer.lock b/composer.lock index 43a06425e..cb287d95e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8acd4eec85be1351459a67cfd14d039b", + "content-hash": "ee788a0a8a86526cd58b0b4853a45c06", "packages": [ { "name": "commerceguys/intl", @@ -1394,6 +1394,109 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "prettus/l5-repository", + "version": "2.6.32", + "source": { + "type": "git", + "url": "https://github.com/andersao/l5-repository.git", + "reference": "f6ebfffee80a38e1d2dcf479e70b1a9ead397c24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/andersao/l5-repository/zipball/f6ebfffee80a38e1d2dcf479e70b1a9ead397c24", + "reference": "f6ebfffee80a38e1d2dcf479e70b1a9ead397c24", + "shasum": "" + }, + "require": { + "illuminate/config": "~5.0", + "illuminate/console": "~5.0", + "illuminate/database": "~5.0", + "illuminate/filesystem": "~5.0", + "illuminate/http": "~5.0", + "illuminate/pagination": "~5.0", + "illuminate/support": "~5.0", + "prettus/laravel-validation": "1.1.*" + }, + "suggest": { + "league/fractal": "Required to use the Fractal Presenter (0.12.*).", + "prettus/laravel-validation": "Required to provide easy validation with the repository (1.1.*)", + "robclancy/presenter": "Required to use the Presenter Model (1.3.*)" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Prettus\\Repository\\Providers\\RepositoryServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Prettus\\Repository\\": "src/Prettus/Repository/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anderson Andrade", + "email": "contato@andersonandra.de", + "role": "Developer" + } + ], + "description": "Laravel 5 - Repositories to the database layer", + "keywords": [ + "cache", + "eloquent", + "laravel", + "model", + "repository" + ], + "time": "2018-01-27T15:53:20+00:00" + }, + { + "name": "prettus/laravel-validation", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/andersao/laravel-validator.git", + "reference": "d9eb401fb3518a890b117e83bd25a4109fcdb704" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/andersao/laravel-validator/zipball/d9eb401fb3518a890b117e83bd25a4109fcdb704", + "reference": "d9eb401fb3518a890b117e83bd25a4109fcdb704", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.4", + "illuminate/validation": "~5.4", + "php": ">=5.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Prettus\\Validator\\": "src/Prettus/Validator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "authors": [ + { + "name": "Anderson Andrade", + "email": "contato@andersonandra.de" + } + ], + "description": "Laravel Validation Service", + "keywords": [ + "laravel", + "service", + "validation" + ], + "time": "2017-08-28T23:28:32+00:00" + }, { "name": "propaganistas/laravel-intl", "version": "2.0.3", diff --git a/config/app.php b/config/app.php index ac0cb2b2b..d34452c5f 100644 --- a/config/app.php +++ b/config/app.php @@ -172,6 +172,7 @@ return [ //Laravel Intervention Intervention\Image\ImageServiceProvider::class, + Prettus\Repository\Providers\RepositoryServiceProvider::class, //Webkul packages Webkul\User\Providers\UserServiceProvider::class, @@ -182,7 +183,6 @@ return [ Webkul\Core\Providers\CoreServiceProvider::class, Webkul\Shop\Providers\ShopServiceProvider::class, Webkul\Customer\Providers\CustomerServiceProvider::class, - Webkul\Channel\Providers\ChannelServiceProvider::class, Webkul\Inventory\Providers\InventoryServiceProvider::class, Webkul\Product\Providers\ProductServiceProvider::class, Webkul\Shop\Providers\ShopServiceProvider::class, @@ -237,6 +237,7 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, 'Datagrid' => Webkul\Ui\DataGrid\Facades\DataGrid::class, + 'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class, 'Image' => Intervention\Image\Facades\Image::class ], diff --git a/packages/Webkul/Admin/.gitignore b/packages/Webkul/Admin/.gitignore index 49e0fc6b4..6376db975 100644 --- a/packages/Webkul/Admin/.gitignore +++ b/packages/Webkul/Admin/.gitignore @@ -1,2 +1,3 @@ /node_modules -/package-lock.json \ No newline at end of file +/package-lock.json +npm-debug.log \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php new file mode 100644 index 000000000..640e10ebd --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php @@ -0,0 +1,191 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class AttributeDataGrid +{ + /** + * The Data Grid implementation. + * + * @var AttributeDataGrid + * for countries + */ + + public function createAttributeDataGrid() + { + + return DataGrid::make([ + 'name' => 'Attributes', + 'table' => 'attributes', + 'select' => 'id', + 'perpage' => 10, + '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', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'attributeId', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'attributeCode', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'admin_name', + 'alias' => 'attributeAdminName', + 'type' => 'string', + 'label' => 'AdminName', + 'sortable' => true, + ], + [ + 'name' => 'type', + 'alias' => 'attributeType', + 'type' => 'string', + 'label' => 'Type', + 'sortable' => true, + ], + [ + 'name' => 'is_required', + 'alias' => 'attributeIsRequired', + 'type' => 'string', + 'label' => 'Required', + 'sortable' => true, + ], + [ + 'name' => 'is_unique', + 'alias' => 'attributeIsUnique', + 'type' => 'string', + 'label' => 'Unique', + 'sortable' => true, + ], + [ + 'name' => 'value_per_locale', + 'alias' => 'attributeValuePerLocale', + 'type' => 'string', + 'label' => 'ValuePerLocale', + 'sortable' => true, + ], + [ + 'name' => 'value_per_channel', + 'alias' => 'attributeValuePerChannel', + 'type' => 'string', + 'label' => 'ValuePerChannel', + 'sortable' => true, + ], + + ], + + 'filterable' => [ + // [ + // 'column' => 'id', + // 'alias' => 'attribute_family_id', + // 'type' => 'number', + // 'label' => 'ID', + // ], + // [ + // 'column' => 'code', + // 'alias' => 'attribute_family_code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + // [ + // 'column' => 'name', + // 'alias' => 'attribute_family_name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + // [ + // 'column' => 'name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + // [ + // 'column' => 'code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + + return $this->createAttributeDataGrid()->render(); + + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php new file mode 100644 index 000000000..9a5dc85c4 --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php @@ -0,0 +1,155 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class AttributeFamilyDataGrid +{ + /** + * The Data Grid implementation. + * + * @var CountryComposer + * for countries + */ + + public function createAttributeFamilyDataGrid() + { + + return DataGrid::make([ + 'name' => 'Attribute Family', + 'table' => 'attribute_families', + 'select' => 'id', + 'perpage' => 10, + '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', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'attributeFamilyId', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'attributeFamilyCode', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'attributeFamilyName', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + ], + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'attributeFamilyId', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'code', + 'alias' => 'attributeFamilyCode', + 'type' => 'string', + 'label' => 'Code', + ], + [ + 'column' => 'name', + 'alias' => 'attributeFamilyName', + 'type' => 'string', + 'label' => 'Name', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + + return $this->createAttributeFamilyDataGrid()->render(); + + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php new file mode 100644 index 000000000..5f85e2f2d --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php @@ -0,0 +1,172 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class CategoryDataGrid +{ + /** + * The Data Grid implementation. + * + * @var AttributeDataGrid + * for countries + */ + + public function createCategoryDataGrid() + { + + return DataGrid::make([ + 'name' => 'Categories', + 'table' => 'categories as cat', + 'select' => 'cat.id', + 'perpage' => 10, + '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', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + [ + 'join' => 'leftjoin', + 'table' => 'category_translations as ct', + 'primaryKey' => 'cat.id', + 'condition' => '=', + 'secondaryKey' => 'ct.category_id', + ], [ + 'join' => 'leftjoin', + 'table' => 'category_translations as cta', + 'primaryKey' => 'cat.parent_id', + 'condition' => '=', + 'secondaryKey' => 'cta.category_id', + ], + + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + [ + 'name' => 'cat.id', + 'alias' => 'catID', + 'type' => 'number', + 'label' => 'Category ID', + 'sortable' => true, + ], [ + 'name' => 'ct.name', + 'alias' => 'catName', + 'type' => 'string', + 'label' => 'Category Name', + 'sortable' => false, + ], [ + 'name' => 'cat.position', + 'alias' => 'catPosition', + 'type' => 'string', + 'label' => 'Category Position', + 'sortable' => false, + ], [ + 'name' => 'cta.name', + 'alias' => 'parentName', + 'type' => 'string', + 'label' => 'Parent Name', + 'sortable' => true, + ], [ + 'name' => 'cat.status', + 'alias' => 'catStatus', + 'type' => 'string', + 'label' => 'Visible in Menu', + 'sortable' => true, + ], + + ], + + 'filterable' => [ + // [ + // 'column' => 'id', + // 'alias' => 'attribute_family_id', + // 'type' => 'number', + // 'label' => 'ID', + // ], + // [ + // 'column' => 'code', + // 'alias' => 'attribute_family_code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + // [ + // 'column' => 'name', + // 'alias' => 'attribute_family_name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + // [ + // 'column' => 'name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + // [ + // 'column' => 'code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + + return $this->createCategoryDataGrid()->render(); + + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php similarity index 87% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php rename to packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index 9a213fa8a..582ddc9e0 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -1,13 +1,19 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class ChannelDataGrid { /** * The Data Grid implementation. @@ -16,17 +22,10 @@ class ChannelsComposer * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createChannelsDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Channels', 'table' => 'channels', 'select' => 'id', @@ -99,19 +98,19 @@ class ChannelsComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'channel_id', + 'alias' => 'channelId', 'type' => 'number', 'label' => 'Channel ID', ], [ 'column' => 'code', - 'alias' => 'channel_code', + 'alias' => 'channelCode', 'type' => 'string', 'label' => 'Channel Code', ], [ 'column' => 'name', - 'alias' => 'channel_name', + 'alias' => 'channelName', 'type' => 'string', 'label' => 'Channel Name', ], @@ -148,7 +147,10 @@ class ChannelsComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createChannelsDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php rename to packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php index 7d4c1ae36..a5c0ddec3 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php @@ -1,13 +1,19 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class CountryDataGrid { /** * The Data Grid implementation. @@ -16,17 +22,10 @@ class CountryComposer * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createCountryDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Countries', 'table' => 'countries', 'select' => 'id', @@ -72,28 +71,28 @@ class CountryComposer [ 'name' => 'id', - 'alias' => 'country_id', + 'alias' => 'countryId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'country_code', + 'alias' => 'countryCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'country_name', + 'alias' => 'countryName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, ], [ 'name' => 'status', - 'alias' => 'country_status', + 'alias' => 'countryStatus', 'type' => 'number', 'label' => 'Code', 'sortable' => true, @@ -106,25 +105,25 @@ class CountryComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'country_id', + 'alias' => 'countryId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'country_code', + 'alias' => 'countryCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'country_name', + 'alias' => 'countryName', 'type' => 'string', 'label' => 'Name', ], [ 'column' => 'status', - 'alias' => 'country_status', + 'alias' => 'countryStatus', 'type' => 'number', 'label' => 'Code', ], @@ -161,7 +160,12 @@ class CountryComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + + return $this->createCountryDataGrid()->render(); + } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php rename to packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php index b489aa97d..e672a7fe0 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php @@ -1,32 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class CurrenciesComposer +class CurrencyDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer + * @var CurrenciesDataGrid * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createCurrencyDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Currencies', 'table' => 'currencies', 'select' => 'id', @@ -72,21 +70,21 @@ class CurrenciesComposer [ 'name' => 'id', - 'alias' => 'currency_id', + 'alias' => 'currencyId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'currency_code', + 'alias' => 'currencyCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'currency_name', + 'alias' => 'currencyName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, @@ -99,19 +97,19 @@ class CurrenciesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'currency_id', + 'alias' => 'currencyId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'currency_code', + 'alias' => 'currencyCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'currency_name', + 'alias' => 'currencyName', 'type' => 'string', 'label' => 'Name', ], @@ -148,7 +146,10 @@ class CurrenciesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createCurrencyDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php similarity index 82% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php rename to packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php index c207f3881..af954a73a 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php @@ -1,32 +1,31 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class ExchangeRatesComposer +class ExchangeRatesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var ExchangeRatesDataGrid + * for Exchange Rates */ - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createExchangeRatesDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Exchange Rates', 'table' => 'currency_exchange_rates', 'select' => 'id', @@ -72,28 +71,28 @@ class ExchangeRatesComposer [ 'name' => 'id', - 'alias' => 'exch_id', + 'alias' => 'exchID', 'type' => 'number', 'label' => 'Rate ID', 'sortable' => true, ], [ 'name' => 'source_currency', - 'alias' => 'exch_source_currency', + 'alias' => 'exchSourceCurrency', 'type' => 'string', 'label' => 'Source Currency', 'sortable' => true, ], [ 'name' => 'target_currency', - 'alias' => 'exch_target_currency', + 'alias' => 'exchTargetCurrency', 'type' => 'string', 'label' => 'Target Currency', 'sortable' => true, ], [ 'name' => 'ratio', - 'alias' => 'exch_ratio', + 'alias' => 'exchRatio', 'type' => 'string', 'label' => 'Exchange Ratio', ], @@ -105,20 +104,20 @@ class ExchangeRatesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'exch_id', + 'alias' => 'exchId', 'type' => 'number', 'label' => 'Rate ID', ], [ 'column' => 'source_currency', - 'alias' => 'exch_source_currency', + 'alias' => 'exchSourceCurrency', 'type' => 'string', 'label' => 'Source Currency', 'sortable' => true, ], [ 'column' => 'target_currency', - 'alias' => 'exch_target_currency', + 'alias' => 'exchTargetCurrency', 'type' => 'string', 'label' => 'Target Currency', 'sortable' => true, @@ -156,7 +155,10 @@ class ExchangeRatesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createExchangeRatesDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php similarity index 81% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php rename to packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php index b6b2c4083..5bad6e70a 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php @@ -1,32 +1,29 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class InventorySourcesComposer +class InventorySourcesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var InventorySourcesDataGrid + * for Inventory Sources */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createInventorySourcesDataGrid() { - - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Inventory Sources', 'table' => 'inventory_sources', 'select' => 'id', @@ -72,35 +69,35 @@ class InventorySourcesComposer [ 'name' => 'id', - 'alias' => 'inventory_id', + 'alias' => 'inventoryID', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'inventory_code', + 'alias' => 'inventoryCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'inventory_name', + 'alias' => 'inventoryName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, ], [ 'name' => 'priority', - 'alias' => 'inventory_priority', + 'alias' => 'inventoryPriority', 'type' => 'string', 'label' => 'Priority', 'sortable' => true, ], [ 'name' => 'status', - 'alias' => 'inventory_status', + 'alias' => 'inventoryStatus', 'type' => 'string', 'label' => 'Status', 'sortable' => true, @@ -113,19 +110,19 @@ class InventorySourcesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'inventory_id', + 'alias' => 'inventoryId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'inventory_code', + 'alias' => 'inventoryCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'inventory_name', + 'alias' => 'inventoryName', 'type' => 'string', 'label' => 'Name', ], @@ -161,7 +158,10 @@ class InventorySourcesComposer // 'css' => [] ]); + } - $view->with('datagrid', $datagrid); + public function render() + { + return $this->createInventorySourcesDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php rename to packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index 8de71b5c9..1f53304e4 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -1,32 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class LocalesComposer +class LocalesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer + * @var CountryDataGrid * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createCountryDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Locales', 'table' => 'locales', 'select' => 'id', @@ -72,21 +70,21 @@ class LocalesComposer [ 'name' => 'id', - 'alias' => 'locale_id', + 'alias' => 'localeId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'locale_code', + 'alias' => 'localeCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'locale_name', + 'alias' => 'localeName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, @@ -99,19 +97,19 @@ class LocalesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'locale_id', + 'alias' => 'localeId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'locale_code', + 'alias' => 'localeCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'locale_name', + 'alias' => 'localeName', 'type' => 'string', 'label' => 'Name', ], @@ -148,7 +146,10 @@ class LocalesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createCountryDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php new file mode 100644 index 000000000..63287c074 --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -0,0 +1,215 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class ProductDataGrid +{ + /** + * The Data Grid implementation. + * @var ProductDataGrid + * for Products + */ + + public function createProductDataGrid() + { + + return ProductGrid::make([ + 'name' => 'Products', + 'table' => 'products as prods', + 'select' => 'prods.id', + 'perpage' => 10, + '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', + // ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'attributeColumns' => [ + 'name', 'price' + ], + + 'join' => [ + + //for getting name of attrib family. + [ + 'join' => 'leftjoin', + 'table' => 'attribute_families as attfam', + 'primaryKey' => 'prods.attribute_family_id', + 'condition' => '=', + 'secondaryKey' => 'attfam.id', + ], + + //for getting the attribute values. + [ + 'join' => 'leftjoin', + 'table' => 'product_attribute_values as pav', + 'primaryKey' => 'prods.id', + 'condition' => '=', + 'secondaryKey' => 'pav.product_id', + 'withAttributes' => true + ], + + //for getting the inventory quantity of a product + [ + 'join' => 'leftjoin', + 'table' => 'product_inventories as pi', + 'primaryKey' => 'prods.id', + 'condition' => '=', + 'secondaryKey' => 'pi.product_id', + ], + + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + //name, alias, type, label, sortable + [ + 'name' => 'prods.id', + 'alias' => 'productID', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'prods.sku', + 'alias' => 'productCode', + 'type' => 'string', + 'label' => 'SKU', + 'sortable' => true, + ], + [ + 'name' => 'attfam.name', + 'alias' => 'FamilyName', + 'type' => 'string', + 'label' => 'Family Name', + 'sortable' => true, + ], + [ + 'name' => 'pi.qty', + 'alias' => 'ProductQuantity', + 'type' => 'string', + 'label' => 'Product Quatity', + 'sortable' => false, + ], + // [ + // 'name' => 'pav.attribute_id', + // 'alias' => 'AttributeID', + // 'type' => 'string', + // 'label' => 'Attribute ID', + // 'sortable' => false, + + // ], + ], + + 'filterable' => [ + //column, type, and label + [ + 'name' => 'prods.id', + 'alias' => 'productID', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'name' => 'prods.sku', + 'alias' => 'productCode', + 'type' => 'string', + 'label' => 'SKU', + ], + [ + 'name' => 'attfam.name', + 'alias' => 'FamilyName', + 'type' => 'string', + 'label' => 'Family Name', + ], + [ + 'name' => 'pi.qty', + 'alias' => 'ProductQuantity', + 'type' => 'string', + 'label' => 'Product Quatity', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + //column, type and label + [ + 'column' => 'prods.id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'prods.sku', + 'type' => 'string', + 'label' => 'SKU', + ], + [ + 'column' => 'attfam.name', + 'type' => 'string', + 'label' => 'Family Name', + ], + [ + 'column' => 'pi.qty', + 'type' => 'string', + 'label' => 'Product Quatity', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + return $this->createProductDataGrid()->render(); + // return $this->getProducts(); + + } + +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php rename to packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php index 82b31fcc9..ab8d08b8b 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php @@ -1,32 +1,31 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class RolesComposer +class RolesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var RolesDataGrid + * for Roles */ - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createRolesDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Roles', 'table' => 'roles', 'select' => 'id', @@ -72,21 +71,21 @@ class RolesComposer [ 'name' => 'id', - 'alias' => 'r_id', + 'alias' => 'roleId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'r_name', + 'alias' => 'roleName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, ], [ 'name' => 'permission_type', - 'alias' => 'r_permission_type', + 'alias' => 'rolePermissionType', 'type' => 'string', 'label' => 'Permission Type', 'sortable' => true, @@ -99,19 +98,19 @@ class RolesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'r_id', + 'alias' => 'roleId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'name', - 'alias' => 'r_name', + 'alias' => 'roleName', 'type' => 'string', 'label' => 'Name', ], [ 'column' => 'permission_type', - 'alias' => 'r_permission_type', + 'alias' => 'rolePermissionType', 'type' => 'string', 'label' => 'Permission Type', ], @@ -148,7 +147,10 @@ class RolesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createRolesDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/SliderComposer.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php similarity index 86% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/SliderComposer.php rename to packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index 480437e8d..aac865c69 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/SliderComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -1,32 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class SliderComposer +class SliderDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var SliderDataGrid + * for Sliders */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createSliderDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Sliders', 'table' => 'sliders as s', 'select' => 's.id', @@ -72,27 +70,27 @@ class SliderComposer [ 'name' => 's.id', - 'alias' => 'slider_id', + 'alias' => 'sliderId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 's.title', - 'alias' => 'slider_title', + 'alias' => 'sliderTitle', 'type' => 'string', 'label' => 'title', ], [ 'name' => 's.channel_id', - 'alias' => 'channel_id', + 'alias' => 'channelId', 'type' => 'string', 'label' => 'Channel ID', 'sortable' => true, ], [ 'name' => 'c.name', - 'alias' => 'channel_name', + 'alias' => 'channelName', 'type' => 'string', 'label' => 'Channel Name', 'sortable' => true, @@ -153,7 +151,10 @@ class SliderComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createSliderDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php similarity index 90% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php rename to packages/Webkul/Admin/src/DataGrids/UserDataGrid.php index e64f8f4d5..2f195a248 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php @@ -1,33 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class UserComposer +class UserDataGrid { /** * The Data Grid implementation. * - * @var UserComposer - * for admin + * @var UserDataGrid + * for admin users */ - protected $users; - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createUserDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Admins', 'table' => 'admins as u', 'select' => 'u.id', @@ -59,7 +56,8 @@ class UserComposer 'route' => route('admin.datagrid.delete'), 'confirm_text' => 'Do you really want to do this?', 'icon' => 'icon pencil-lg-icon', - ], [ + ], + [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), 'confirm_text' => 'Do you really want to do this?', @@ -148,14 +146,16 @@ class UserComposer 'alias' => 'Name', 'type' => 'string', 'label' => 'Name' - ], [ + ], + [ 'column' => 'u.id', 'alias' => 'ID', 'type' => 'number', 'label' => 'Admin ID' - ], [ + ], + [ 'column' => 'r.id', - 'alias' => 'Role_ID', + 'alias' => 'xc', 'type' => 'number', 'label' => 'Role ID' ] @@ -166,7 +166,8 @@ class UserComposer 'column' => 'u.email', 'type' => 'string', 'label' => 'E-Mail' - ], [ + ], + [ 'column' => 'u.name', 'type' => 'string', 'label' => 'Name' @@ -187,7 +188,11 @@ class UserComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() { + + return $this->createUserDataGrid()->render(); + } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index 879f9e4a9..ffa52dcad 100644 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -271,23 +271,23 @@ Route::group(['middleware' => ['web']], function () { // Channel Routes - Route::get('/channels', 'Webkul\Channel\Http\Controllers\ChannelController@index')->defaults('_config', [ + Route::get('/channels', 'Webkul\Core\Http\Controllers\ChannelController@index')->defaults('_config', [ 'view' => 'admin::settings.channels.index' ])->name('admin.channels.index'); - Route::get('/channels/create', 'Webkul\Channel\Http\Controllers\ChannelController@create')->defaults('_config', [ + Route::get('/channels/create', 'Webkul\Core\Http\Controllers\ChannelController@create')->defaults('_config', [ 'view' => 'admin::settings.channels.create' ])->name('admin.channels.create'); - Route::post('/channels/create', 'Webkul\Channel\Http\Controllers\ChannelController@store')->defaults('_config', [ + Route::post('/channels/create', 'Webkul\Core\Http\Controllers\ChannelController@store')->defaults('_config', [ 'redirect' => 'admin.channels.index' ])->name('admin.channels.store'); - Route::get('/channels/edit/{id}', 'Webkul\Channel\Http\Controllers\ChannelController@edit')->defaults('_config', [ + Route::get('/channels/edit/{id}', 'Webkul\Core\Http\Controllers\ChannelController@edit')->defaults('_config', [ 'view' => 'admin::settings.channels.edit' ])->name('admin.channels.edit'); - Route::put('/channels/edit/{id}', 'Webkul\Channel\Http\Controllers\ChannelController@update')->defaults('_config', [ + Route::put('/channels/edit/{id}', 'Webkul\Core\Http\Controllers\ChannelController@update')->defaults('_config', [ 'redirect' => 'admin.channels.index' ])->name('admin.channels.update'); diff --git a/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php b/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php index 66e18b19c..5e94fd48d 100644 --- a/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php +++ b/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Blade; use Webkul\Admin\Providers\EventServiceProvider; -use Webkul\Admin\Providers\ComposerServiceProvider; class AdminServiceProvider extends ServiceProvider { @@ -30,7 +29,6 @@ class AdminServiceProvider extends ServiceProvider $this->composeView(); $this->app->register(EventServiceProvider::class); - $this->app->register(ComposerServiceProvider::class); } /** diff --git a/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php b/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php deleted file mode 100644 index ce77d7de8..000000000 --- a/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php +++ /dev/null @@ -1,58 +0,0 @@ -add('inventories', 'Inventories', 'admin::catalog.products.accordians.inventories', 1); diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php index d6305062d..f8befdc33 100644 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php @@ -15,7 +15,8 @@
| First Name | {{ $customer['first_name'] }} |
| Last Name | {{ $customer['last_name'] }} |
| Gender Name | {{ $customer['gender'] }} |
| Date of Birth | {{ $customer['date_of_birth'] }} |
| Email Address | {{ $customer['email'] }} |
| Mobile | {{ $customer['phone'] }} |
diff --git a/packages/Webkul/Shop/src/Resources/views/home/index.blade.php b/packages/Webkul/Shop/src/Resources/views/home/index.blade.php
index 068573201..1b87d248e 100644
--- a/packages/Webkul/Shop/src/Resources/views/home/index.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/home/index.blade.php
@@ -5,7 +5,9 @@
@endsection
@section('content-wrapper')
- @include('shop::grids.featured.featuredproductgrid')
- @include('shop::grids.newproduct.newproductgrid')
- @include('shop::grids.newsupdate.newsupdategrid')
+ @include('shop::home.featured-products')
+
+ @include('shop::home.new-products')
+
+ @include('shop::home.news-updates')
@endsection
diff --git a/packages/Webkul/Shop/src/Resources/views/grids/newproduct/newproductgrid.blade.php b/packages/Webkul/Shop/src/Resources/views/home/new-products.blade.php
similarity index 98%
rename from packages/Webkul/Shop/src/Resources/views/grids/newproduct/newproductgrid.blade.php
rename to packages/Webkul/Shop/src/Resources/views/home/new-products.blade.php
index 8d3ce62db..e28c13eb4 100644
--- a/packages/Webkul/Shop/src/Resources/views/grids/newproduct/newproductgrid.blade.php
+++ b/packages/Webkul/Shop/src/Resources/views/home/new-products.blade.php
@@ -4,7 +4,7 @@
_____
@@ -25,6 +25,7 @@
@@ -45,6 +46,7 @@
@@ -65,6 +67,7 @@
diff --git a/packages/Webkul/Shop/src/Resources/views/grids/newsupdate/newsupdategrid.blade.php b/packages/Webkul/Shop/src/Resources/views/home/news-updates.blade.php
similarity index 100%
rename from packages/Webkul/Shop/src/Resources/views/grids/newsupdate/newsupdategrid.blade.php
rename to packages/Webkul/Shop/src/Resources/views/home/news-updates.blade.php
diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/foo.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/foo.blade.php
new file mode 100644
index 000000000..2bbfc9980
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/layouts/foo.blade.php
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+