All datagrids are generating before add column, action and mass action
This commit is contained in:
parent
7d7cda1f73
commit
98e8f3c57d
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class GenerateProducts extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'bagisto:generate {products},{nos?}';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Attempts to generate random products available in the system';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->comment('v' . config('app.version'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -50,7 +50,7 @@ class AttributeDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'admin_name',
|
'index' => 'admin_name',
|
||||||
'label' => trans('admin::app.datagrid.admin-name'),
|
'label' => trans('admin::app.name'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -59,30 +59,30 @@ class AttributeDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'type',
|
'index' => 'type',
|
||||||
'label' => trans('admin::app.datagrid.type'),
|
'label' => trans('admin::app.type'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'filterable' => true
|
'filterable' => true
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// $this->addColumn([
|
$this->addColumn([
|
||||||
// 'index' => 'is_required',
|
'index' => 'is_required',
|
||||||
// 'label' => trans('admin::app.datagrid.required'),
|
'label' => trans('admin::app.required'),
|
||||||
// 'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
// 'sortable' => true,
|
'sortable' => true,
|
||||||
// 'searchable' => false,
|
'searchable' => false,
|
||||||
// 'wrapper' => function($value) {
|
'wrapper' => function($value) {
|
||||||
// if ($value->is_required == 1)
|
if ($value->is_required == 1)
|
||||||
// return 'True';
|
return 'True';
|
||||||
// else
|
else
|
||||||
// return 'False';
|
return 'False';
|
||||||
// }
|
}
|
||||||
// ]);
|
]);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'is_unique',
|
'index' => 'is_unique',
|
||||||
'label' => trans('admin::app.datagrid.unique'),
|
'label' => trans('admin::app.unique'),
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
|
|
@ -97,7 +97,7 @@ class AttributeDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'value_per_locale',
|
'index' => 'value_per_locale',
|
||||||
'label' => trans('admin::app.datagrid.per-locale'),
|
'label' => trans('admin::app.locale-based'),
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
|
|
@ -112,7 +112,7 @@ class AttributeDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'value_per_channel',
|
'index' => 'value_per_channel',
|
||||||
'label' => trans('admin::app.datagrid.per-channel'),
|
'label' => trans('admin::app.channel-based'),
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
|
|
@ -129,15 +129,15 @@ class AttributeDataGrid extends DataGrid
|
||||||
public function prepareActions()
|
public function prepareActions()
|
||||||
{
|
{
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Attribute',
|
||||||
'method' => 'GET', //use post only for redirects only
|
'method' => 'GET', //use get for redirects only
|
||||||
'route' => 'admin.catalog.attributes.edit',
|
'route' => 'admin.catalog.attributes.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Attribute',
|
||||||
'method' => 'POST', //use post only for requests other than redirects
|
'method' => 'POST', // other than get request it fires ajax and self refreshes datagrid
|
||||||
'route' => 'admin.catalog.attributes.delete',
|
'route' => 'admin.catalog.attributes.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,11 @@ class AttributeFamilyDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.id'),
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -37,7 +39,7 @@ class AttributeFamilyDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'code',
|
'index' => 'code',
|
||||||
'label' => trans('admin::app.datagrid.code'),
|
'label' => trans('admin::app.code'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -46,7 +48,7 @@ class AttributeFamilyDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'name',
|
'index' => 'name',
|
||||||
'label' => trans('admin::app.datagrid.name'),
|
'label' => trans('admin::app.name'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -56,14 +58,14 @@ class AttributeFamilyDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Attribute Family',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.catalog.families.edit',
|
'route' => 'admin.catalog.families.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Attribute Family',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes and POST for rest
|
'method' => 'POST', // use GET request only for redirect purposes and POST for rest
|
||||||
'route' => 'admin.catalog.families.delete',
|
'route' => 'admin.catalog.families.delete',
|
||||||
// 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
// 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ class CMSPageDataGrid extends DataGrid
|
||||||
|
|
||||||
$locales = app('Webkul\Core\Repositories\LocaleRepository');
|
$locales = app('Webkul\Core\Repositories\LocaleRepository');
|
||||||
|
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -88,14 +90,14 @@ class CMSPageDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit CMSPage',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.cms.edit',
|
'route' => 'admin.cms.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete CMSPage',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.cms.delete',
|
'route' => 'admin.cms.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,11 @@ class CartRuleDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.id'),
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -39,7 +41,7 @@ class CartRuleDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'name',
|
'index' => 'name',
|
||||||
'label' => trans('admin::app.datagrid.name'),
|
'label' => trans('admin::app.name'),
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -48,7 +50,7 @@ class CartRuleDataGrid extends DataGrid
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'status',
|
'index' => 'status',
|
||||||
'label' => trans('admin::app.datagrid.status'),
|
'label' => trans('admin::app.status'),
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -117,14 +119,14 @@ class CartRuleDataGrid extends DataGrid
|
||||||
public function prepareActions()
|
public function prepareActions()
|
||||||
{
|
{
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit CartRule',
|
||||||
'method' => 'GET', //use post only for redirects only
|
'method' => 'GET', //use post only for redirects only
|
||||||
'route' => 'admin.cart-rule.edit',
|
'route' => 'admin.cart-rule.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete CartRule',
|
||||||
'method' => 'POST', //use post only for requests other than redirects
|
'method' => 'POST', //use post only for requests other than redirects
|
||||||
'route' => 'admin.cart-rule.delete',
|
'route' => 'admin.cart-rule.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ class CatalogRuleDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -107,14 +109,14 @@ class CatalogRuleDataGrid extends DataGrid
|
||||||
public function prepareActions()
|
public function prepareActions()
|
||||||
{
|
{
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit CatalogRule',
|
||||||
'method' => 'GET', //use post only for redirects only
|
'method' => 'GET', //use post only for redirects only
|
||||||
'route' => 'admin.catalog-rule.edit',
|
'route' => 'admin.catalog-rule.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete CatalogRule',
|
||||||
'method' => 'POST', //use post only for requests other than redirects
|
'method' => 'POST', //use post only for requests other than redirects
|
||||||
'route' => 'admin.catalog-rule.delete',
|
'route' => 'admin.catalog-rule.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ class CategoryDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'category_id',
|
'index' => 'category_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -91,14 +93,14 @@ class CategoryDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Category',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.catalog.categories.edit',
|
'route' => 'admin.catalog.categories.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Category',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.catalog.categories.delete',
|
'route' => 'admin.catalog.categories.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class ChannelDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -65,14 +67,14 @@ class ChannelDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Channel',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.channels.edit',
|
'route' => 'admin.channels.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Channel',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.channels.delete',
|
'route' => 'admin.channels.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class CurrencyDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -56,14 +58,14 @@ class CurrencyDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Currency',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.currencies.edit',
|
'route' => 'admin.currencies.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Currency',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.currencies.delete',
|
'route' => 'admin.currencies.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ class CustomerDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'customer_id',
|
'index' => 'customer_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -89,7 +91,6 @@ class CustomerDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.customer.edit',
|
'route' => 'admin.customer.edit',
|
||||||
'icon' => 'icon pencil-lg-icon',
|
'icon' => 'icon pencil-lg-icon',
|
||||||
|
|
@ -97,7 +98,6 @@ class CustomerDataGrid extends DataGrid
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.customer.delete',
|
'route' => 'admin.customer.delete',
|
||||||
'icon' => 'icon trash-icon',
|
'icon' => 'icon trash-icon',
|
||||||
|
|
@ -105,7 +105,6 @@ class CustomerDataGrid extends DataGrid
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Add Note',
|
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'route' => 'admin.customer.note.create',
|
'route' => 'admin.customer.note.create',
|
||||||
'icon' => 'icon note-icon',
|
'icon' => 'icon note-icon',
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class CustomerGroupDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
|
|
@ -56,14 +58,14 @@ class CustomerGroupDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Customer Group',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.groups.edit',
|
'route' => 'admin.groups.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Customer Group',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.groups.delete',
|
'route' => 'admin.groups.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ class CustomerReviewDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'product_review_id',
|
'index' => 'product_review_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -92,14 +94,14 @@ class CustomerReviewDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Customer Review',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.customer.review.edit',
|
'route' => 'admin.customer.review.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Customer Review',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.customer.review.delete',
|
'route' => 'admin.customer.review.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ class ExchangeRatesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'currency_exch_id',
|
'index' => 'currency_exch_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -58,14 +60,14 @@ class ExchangeRatesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Exchange Rate',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.exchange_rates.edit',
|
'route' => 'admin.exchange_rates.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Exchange Rate',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.exchange_rates.delete',
|
'route' => 'admin.exchange_rates.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class InventorySourcesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -80,14 +82,14 @@ class InventorySourcesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Inventory Source',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.inventory_sources.edit',
|
'route' => 'admin.inventory_sources.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Inventory Source',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.inventory_sources.delete',
|
'route' => 'admin.inventory_sources.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class LocalesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -65,14 +67,14 @@ class LocalesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Locales',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.locales.edit',
|
'route' => 'admin.locales.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Locales',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.locales.delete',
|
'route' => 'admin.locales.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class NewsLetterDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -62,14 +64,14 @@ class NewsLetterDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit News Letter',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.customers.subscribers.edit',
|
'route' => 'admin.customers.subscribers.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete News Letter',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.customers.subscribers.delete',
|
'route' => 'admin.customers.subscribers.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']),
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ class OrderDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -134,7 +136,7 @@ class OrderDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'View',
|
'title' => 'Order View',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.sales.orders.view',
|
'route' => 'admin.sales.orders.view',
|
||||||
'icon' => 'icon eye-icon'
|
'icon' => 'icon eye-icon'
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class OrderInvoicesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -65,7 +67,7 @@ class OrderInvoicesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'View',
|
'title' => 'Order Invoice View',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.sales.invoices.view',
|
'route' => 'admin.sales.invoices.view',
|
||||||
'icon' => 'icon eye-icon'
|
'icon' => 'icon eye-icon'
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ class OrderShipmentsDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'shipment_id',
|
'index' => 'shipment_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -108,7 +110,7 @@ class OrderShipmentsDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'View',
|
'title' => 'Order Shipment View',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.sales.shipments.view',
|
'route' => 'admin.sales.shipments.view',
|
||||||
'icon' => 'icon eye-icon'
|
'icon' => 'icon eye-icon'
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ class ProductDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'product_id',
|
'index' => 'product_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -129,14 +131,14 @@ class ProductDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Product',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.catalog.products.edit',
|
'route' => 'admin.catalog.products.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Product',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.catalog.products.delete',
|
'route' => 'admin.catalog.products.delete',
|
||||||
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']),
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class RolesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -57,14 +59,14 @@ class RolesDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.roles.edit',
|
'route' => 'admin.roles.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.roles.delete',
|
'route' => 'admin.roles.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ class SliderDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'slider_id',
|
'index' => 'slider_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -60,14 +62,14 @@ class SliderDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Slider',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.sliders.edit',
|
'route' => 'admin.sliders.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Slider',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.sliders.delete',
|
'route' => 'admin.sliders.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class TaxCategoryDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -56,14 +58,14 @@ class TaxCategoryDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Tax Category',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.tax-categories.edit',
|
'route' => 'admin.tax-categories.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Tax Category',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.tax-categories.delete',
|
'route' => 'admin.tax-categories.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ class TaxRateDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'id',
|
'index' => 'id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -101,14 +103,14 @@ class TaxRateDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit Tax Rate',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.tax-rates.store',
|
'route' => 'admin.tax-rates.store',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete Tax Rate',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.tax-rates.delete',
|
'route' => 'admin.tax-rates.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ class UserDataGrid extends DataGrid
|
||||||
|
|
||||||
public function addColumns()
|
public function addColumns()
|
||||||
{
|
{
|
||||||
|
$this->setInvoker($this);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'user_id',
|
'index' => 'user_id',
|
||||||
'label' => trans('admin::app.datagrid.id'),
|
'label' => trans('admin::app.datagrid.id'),
|
||||||
|
|
@ -85,14 +87,14 @@ class UserDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Edit',
|
'title' => 'Edit User',
|
||||||
'method' => 'GET', // use GET request only for redirect purposes
|
'method' => 'GET', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.users.edit',
|
'route' => 'admin.users.edit',
|
||||||
'icon' => 'icon pencil-lg-icon'
|
'icon' => 'icon pencil-lg-icon'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addAction([
|
$this->addAction([
|
||||||
'type' => 'Delete',
|
'title' => 'Delete User',
|
||||||
'method' => 'POST', // use GET request only for redirect purposes
|
'method' => 'POST', // use GET request only for redirect purposes
|
||||||
'route' => 'admin.users.delete',
|
'route' => 'admin.users.delete',
|
||||||
'icon' => 'icon trash-icon'
|
'icon' => 'icon trash-icon'
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,9 @@ return [
|
||||||
'no result' => 'No result',
|
'no result' => 'No result',
|
||||||
'product' => 'Product',
|
'product' => 'Product',
|
||||||
'attribute' => 'Attribute',
|
'attribute' => 'Attribute',
|
||||||
|
'actions' => 'Actions',
|
||||||
|
'id' => 'ID',
|
||||||
|
'action' => 'action',
|
||||||
'yes' => 'Yes',
|
'yes' => 'Yes',
|
||||||
'no' => 'No',
|
'no' => 'No',
|
||||||
'true' => 'True',
|
'true' => 'True',
|
||||||
|
|
@ -18,6 +21,15 @@ return [
|
||||||
'apply' => 'Apply',
|
'apply' => 'Apply',
|
||||||
'action' => 'Action',
|
'action' => 'Action',
|
||||||
'label' => 'Label',
|
'label' => 'Label',
|
||||||
|
'name' => 'Name',
|
||||||
|
'title' => 'Title',
|
||||||
|
'code' => 'Code',
|
||||||
|
'type' => 'Type',
|
||||||
|
'required' => 'Required',
|
||||||
|
'unique' => 'Unique',
|
||||||
|
'locale-based' => 'Locale based',
|
||||||
|
'channel-based' => 'Channel based',
|
||||||
|
'status' => 'Status',
|
||||||
|
|
||||||
'common' => [
|
'common' => [
|
||||||
'no-result-found' => 'We could not find any records.',
|
'no-result-found' => 'We could not find any records.',
|
||||||
|
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace Webkul\Product\Commands;
|
|
||||||
|
|
||||||
use Webkul\Product\Repositories\ProductRepository as Product;
|
|
||||||
|
|
||||||
class DemoProducts
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Holds ProductRepository instance
|
|
||||||
*/
|
|
||||||
protected $product;
|
|
||||||
|
|
||||||
public function __construct(Product $product)
|
|
||||||
{
|
|
||||||
$this->product = $product;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To call the seeder and provide the demo data generators parameters
|
|
||||||
*/
|
|
||||||
public function callGenerator()
|
|
||||||
{
|
|
||||||
|
|
||||||
$result = $this->productSeeder();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -9,5 +9,6 @@ class ProductTableSeeder extends Seeder
|
||||||
{
|
{
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
dd('running');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -170,13 +170,13 @@ abstract class DataGrid
|
||||||
|
|
||||||
public function addColumn($column)
|
public function addColumn($column)
|
||||||
{
|
{
|
||||||
$this->fireEvent('before.add.column.'.$column['index']);
|
// $this->fireEvent('before.add.column.'.$column['index']);
|
||||||
|
|
||||||
array_push($this->columns, $column);
|
array_push($this->columns, $column);
|
||||||
|
|
||||||
$this->setCompleteColumnDetails($column);
|
$this->setCompleteColumnDetails($column);
|
||||||
|
|
||||||
$this->fireEvent('after.add.column.'.$column['index']);
|
// $this->fireEvent('after.add.column.'.$column['index']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCompleteColumnDetails($column)
|
public function setCompleteColumnDetails($column)
|
||||||
|
|
@ -191,16 +191,40 @@ abstract class DataGrid
|
||||||
|
|
||||||
public function addAction($action)
|
public function addAction($action)
|
||||||
{
|
{
|
||||||
|
if (isset($action['title'])) {
|
||||||
|
$eventName = strtolower($action['title']);
|
||||||
|
$eventName = explode(' ', $eventName);
|
||||||
|
$eventName = implode('.', $eventName);
|
||||||
|
} else {
|
||||||
|
$eventName = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// $this->fireEvent('action.before.'.$eventName);
|
||||||
|
|
||||||
array_push($this->actions, $action);
|
array_push($this->actions, $action);
|
||||||
|
|
||||||
$this->enableAction = true;
|
$this->enableAction = true;
|
||||||
|
|
||||||
|
$this->fireEvent('action.after.' . $eventName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addMassAction($massAction)
|
public function addMassAction($massAction)
|
||||||
{
|
{
|
||||||
|
if (isset($massAction['label'])) {
|
||||||
|
$eventName = strtolower($massAction['label']);
|
||||||
|
$eventName = explode(' ', $eventName);
|
||||||
|
$eventName = implode('.', $eventName);
|
||||||
|
} else {
|
||||||
|
$eventName = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->fireEvent('mass.action.before.' . $eventName);
|
||||||
|
|
||||||
array_push($this->massActions, $massAction);
|
array_push($this->massActions, $massAction);
|
||||||
|
|
||||||
$this->enableMassAction = true;
|
$this->enableMassAction = true;
|
||||||
|
|
||||||
|
$this->fireEvent('mass.action.after.' . $eventName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCollection()
|
public function getCollection()
|
||||||
|
|
@ -377,15 +401,17 @@ abstract class DataGrid
|
||||||
|
|
||||||
protected function fireEvent($name)
|
protected function fireEvent($name)
|
||||||
{
|
{
|
||||||
$className = get_class($this->invoker);
|
if (isset($name)) {
|
||||||
|
$className = get_class($this->invoker);
|
||||||
|
|
||||||
$className = last(explode("\\", $className));
|
$className = last(explode("\\", $className));
|
||||||
|
|
||||||
$className = strtolower($className);
|
$className = strtolower($className);
|
||||||
|
|
||||||
$eventName = $className.'.'.$name;
|
$eventName = $className . '.' . $name;
|
||||||
|
|
||||||
Event::fire($eventName, $this->invoker);
|
Event::fire($eventName, $this->invoker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prepareMassActions() {
|
public function prepareMassActions() {
|
||||||
|
|
@ -394,13 +420,9 @@ abstract class DataGrid
|
||||||
public function prepareActions() {
|
public function prepareActions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setInvoker($class)
|
public function setInvoker($object)
|
||||||
{
|
{
|
||||||
$this->invoker = $class;
|
$this->invoker = $object;
|
||||||
|
|
||||||
// $this->invoker = last(explode("\\", $class));
|
|
||||||
|
|
||||||
// $this->invoker = strtolower($this->invoker);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@if ($enableActions)
|
@if ($enableActions)
|
||||||
<td class="actions" style="width: 100px;" data-value=" {{ __('ui::app.datagrid.actions') }}">
|
<td class="actions" style="width: 100px;" data-value="{{ __('ui::app.datagrid.actions') }}">
|
||||||
<div class="action">
|
<div class="action">
|
||||||
@foreach ($actions as $action)
|
@foreach ($actions as $action)
|
||||||
<a
|
<a
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue