Datagrid Integration in Settings done.
This commit is contained in:
parent
2c90d713af
commit
3fa134ca16
|
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class ChannelsComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Channels',
|
||||
'table' => 'channels',
|
||||
'select' => 'id',
|
||||
'perpage' => 5,
|
||||
'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 edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [
|
||||
// [
|
||||
// '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' => 'channel_id',
|
||||
'type' => 'number',
|
||||
'label' => 'Channel ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'code',
|
||||
'alias' => 'channel_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'alias' => 'channel_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'channel_id',
|
||||
'type' => 'number',
|
||||
'label' => 'Channel ID',
|
||||
],
|
||||
[
|
||||
'column' => 'code',
|
||||
'alias' => 'channel_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Code',
|
||||
],
|
||||
[
|
||||
'column' => 'name',
|
||||
'alias' => 'channel_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
],
|
||||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
],
|
||||
[
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Code',
|
||||
],
|
||||
],
|
||||
|
||||
//list of viable operators that will be used
|
||||
'operators' => [
|
||||
'eq' => "=",
|
||||
'lt' => "<",
|
||||
'gt' => ">",
|
||||
'lte' => "<=",
|
||||
'gte' => ">=",
|
||||
'neqs' => "<>",
|
||||
'neqn' => "!=",
|
||||
'like' => "like",
|
||||
'nlike' => "not like",
|
||||
],
|
||||
// 'css' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
// $view->with('count', $this->users->count());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class CountryComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Countries',
|
||||
'table' => 'countries',
|
||||
'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' => 'country_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'code',
|
||||
'alias' => 'country_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'alias' => 'country_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'status',
|
||||
'alias' => 'country_status',
|
||||
'type' => 'number',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'country_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
'column' => 'code',
|
||||
'alias' => 'country_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
'column' => 'name',
|
||||
'alias' => 'country_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
'column' => 'status',
|
||||
'alias' => 'country_status',
|
||||
'type' => 'number',
|
||||
'label' => 'Code',
|
||||
],
|
||||
],
|
||||
|
||||
//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' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
// $view->with('count', $this->users->count());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class CurrenciesComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Currencies',
|
||||
'table' => 'currencies',
|
||||
'select' => 'id',
|
||||
'perpage' => 5,
|
||||
'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 edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [
|
||||
// [
|
||||
// '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' => 'currency_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'code',
|
||||
'alias' => 'currency_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'alias' => 'currency_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'currency_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
'column' => 'code',
|
||||
'alias' => 'currency_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
'column' => 'name',
|
||||
'alias' => 'currency_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' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
// $view->with('count', $this->users->count());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class ExchangeRatesComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Exchange Rates',
|
||||
'table' => 'currency_exchange_rates',
|
||||
'select' => 'id',
|
||||
'perpage' => 5,
|
||||
'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 edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [
|
||||
// [
|
||||
// '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' => 'exch_id',
|
||||
'type' => 'number',
|
||||
'label' => 'Rate ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'source_currency',
|
||||
'alias' => 'exch_source_currency',
|
||||
'type' => 'string',
|
||||
'label' => 'Source Currency',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'target_currency',
|
||||
'alias' => 'exch_target_currency',
|
||||
'type' => 'string',
|
||||
'label' => 'Target Currency',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'ratio',
|
||||
'alias' => 'exch_ratio',
|
||||
'type' => 'string',
|
||||
'label' => 'Exchange Ratio',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'exch_id',
|
||||
'type' => 'number',
|
||||
'label' => 'Rate ID',
|
||||
],
|
||||
[
|
||||
'column' => 'source_currency',
|
||||
'alias' => 'exch_source_currency',
|
||||
'type' => 'string',
|
||||
'label' => 'Source Currency',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'column' => 'target_currency',
|
||||
'alias' => 'exch_target_currency',
|
||||
'type' => 'string',
|
||||
'label' => 'Target Currency',
|
||||
'sortable' => true,
|
||||
],
|
||||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'source_currency',
|
||||
'type' => 'string',
|
||||
'label' => 'Source Currency',
|
||||
],
|
||||
[
|
||||
'column' => 'target_currency',
|
||||
'type' => 'string',
|
||||
'label' => 'Target Currency',
|
||||
],
|
||||
],
|
||||
|
||||
//list of viable operators that will be used
|
||||
'operators' => [
|
||||
'eq' => "=",
|
||||
'lt' => "<",
|
||||
'gt' => ">",
|
||||
'lte' => "<=",
|
||||
'gte' => ">=",
|
||||
'neqs' => "<>",
|
||||
'neqn' => "!=",
|
||||
'like' => "like",
|
||||
'nlike' => "not like",
|
||||
],
|
||||
// 'css' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
// $view->with('count', $this->users->count());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class InventorySourcesComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Inventory Sources',
|
||||
'table' => 'inventory_sources',
|
||||
'select' => 'id',
|
||||
'perpage' => 5,
|
||||
'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 edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [
|
||||
// [
|
||||
// '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' => 'inventory_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'code',
|
||||
'alias' => 'inventory_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'alias' => 'inventory_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'priority',
|
||||
'alias' => 'inventory_priority',
|
||||
'type' => 'string',
|
||||
'label' => 'Priority',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'status',
|
||||
'alias' => 'inventory_status',
|
||||
'type' => 'string',
|
||||
'label' => 'Status',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'inventory_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
'column' => 'code',
|
||||
'alias' => 'inventory_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
'column' => 'name',
|
||||
'alias' => 'inventory_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' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class LocalesComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Locales',
|
||||
'table' => 'locales',
|
||||
'select' => 'id',
|
||||
'perpage' => 5,
|
||||
'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 edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [
|
||||
// [
|
||||
// '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' => 'locale_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'code',
|
||||
'alias' => 'locale_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'alias' => 'locale_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'locale_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
'column' => 'code',
|
||||
'alias' => 'locale_code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
'column' => 'name',
|
||||
'alias' => 'locale_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' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
// $view->with('count', $this->users->count());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\Http\ViewComposers\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
// use App\Repositories\UserRepository;
|
||||
|
||||
class RolesComposer
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var CountryComposer
|
||||
* for countries
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
$datagrid = DataGrid::make([
|
||||
'name' => 'Roles',
|
||||
'table' => 'roles',
|
||||
'select' => 'id',
|
||||
'perpage' => 5,
|
||||
'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 edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [
|
||||
// [
|
||||
// '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' => 'r_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'name',
|
||||
'alias' => 'r_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'permission_type',
|
||||
'alias' => 'r_permission_type',
|
||||
'type' => 'string',
|
||||
'label' => 'Permission Type',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'r_id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
'column' => 'name',
|
||||
'alias' => 'r_name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
'column' => 'permission_type',
|
||||
'alias' => 'r_permission_type',
|
||||
'type' => 'string',
|
||||
'label' => 'Permission Type',
|
||||
],
|
||||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
'column' => 'permission_type',
|
||||
'type' => 'string',
|
||||
'label' => 'Permission Type',
|
||||
],
|
||||
],
|
||||
|
||||
//list of viable operators that will be used
|
||||
'operators' => [
|
||||
'eq' => "=",
|
||||
'lt' => "<",
|
||||
'gt' => ">",
|
||||
'lte' => "<=",
|
||||
'gte' => ">=",
|
||||
'neqs' => "<>",
|
||||
'neqn' => "!=",
|
||||
'like' => "like",
|
||||
'nlike' => "not like",
|
||||
],
|
||||
// 'css' => []
|
||||
|
||||
]);
|
||||
|
||||
$view->with('datagrid', $datagrid);
|
||||
// $view->with('count', $this->users->count());
|
||||
}
|
||||
}
|
||||
|
|
@ -55,15 +55,15 @@ class UserComposer
|
|||
],
|
||||
'actions' => [
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'icon' => 'icon trash-icon',
|
||||
], [
|
||||
'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' => [
|
||||
|
|
@ -92,7 +92,7 @@ class UserComposer
|
|||
'name' => 'u.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Name',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value, $object) {
|
||||
return '<a class="color-red">' . $object->Name . '</a>';
|
||||
|
|
@ -102,7 +102,7 @@ class UserComposer
|
|||
'name' => 'u.email',
|
||||
'alias' => 'Email',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin E-Mail',
|
||||
'label' => 'E-Mail',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
|
|
@ -147,7 +147,7 @@ class UserComposer
|
|||
'column' => 'u.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Name'
|
||||
'label' => 'Name'
|
||||
], [
|
||||
'column' => 'u.id',
|
||||
'alias' => 'ID',
|
||||
|
|
@ -165,11 +165,11 @@ class UserComposer
|
|||
[
|
||||
'column' => 'u.email',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin E-Mail'
|
||||
'label' => 'E-Mail'
|
||||
], [
|
||||
'column' => 'u.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Admin Name'
|
||||
'label' => 'Name'
|
||||
]
|
||||
],
|
||||
'operators' => [
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
])->name('admin.countries.store');
|
||||
|
||||
|
||||
// Country Routes
|
||||
// Currency Routes
|
||||
Route::get('/currencies', 'Webkul\Core\Http\Controllers\CurrencyController@index')->defaults('_config', [
|
||||
'view' => 'admin::settings.currencies.index'
|
||||
])->name('admin.currencies.index');
|
||||
|
|
@ -226,7 +226,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
])->name('admin.currencies.store');
|
||||
|
||||
|
||||
// Country Routes
|
||||
// Exchange Rates Routes
|
||||
Route::get('/exchange_rates', 'Webkul\Core\Http\Controllers\ExchangeRateController@index')->defaults('_config', [
|
||||
'view' => 'admin::settings.exchange_rates.index'
|
||||
])->name('admin.exchange_rates.index');
|
||||
|
|
|
|||
|
|
@ -16,14 +16,31 @@ class ComposerServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Using class based composers...
|
||||
|
||||
//for the users in the countries dashboard
|
||||
View::composer('admin::settings.countries.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\CountryComposer');
|
||||
|
||||
//for the users in the admin dashboard
|
||||
View::composer('admin::users.users.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\UserComposer');
|
||||
|
||||
// Using Closure based composers...
|
||||
//for the users in the admin dashboard
|
||||
View::composer('admin::users.roles.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\RolesComposer');
|
||||
|
||||
//for the locales in admin dashboard
|
||||
View::composer('admin::settings.locales.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\LocalesComposer');
|
||||
|
||||
//for the currencies in admin dashboard
|
||||
View::composer('admin::settings.currencies.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\CurrenciesComposer');
|
||||
|
||||
//for the Exchange Rates in admin dashboard
|
||||
View::composer('admin::settings.exchange_rates.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\ExchangeRatesComposer');
|
||||
|
||||
//for inventory sources in admin dashboard
|
||||
View::composer('admin::settings.inventory_sources.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\InventorySourcesComposer');
|
||||
|
||||
//for channels in admin dashboard
|
||||
View::composer('admin::settings.channels.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\ChannelsComposer');
|
||||
|
||||
// View::composer('admin::users.index', function ($view) {
|
||||
// //
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ return [
|
|||
'submit-btn-title' => 'Reset Password'
|
||||
],
|
||||
'roles' => [
|
||||
'title' => 'Roles',
|
||||
'add-role-title' => 'Add Role',
|
||||
'edit-role-title' => 'Edit Role',
|
||||
'save-btn-title' => 'Save Role',
|
||||
|
|
@ -40,6 +41,7 @@ return [
|
|||
'all' => 'All'
|
||||
],
|
||||
'users' => [
|
||||
'title' => 'Users',
|
||||
'add-user-title' => 'Add User',
|
||||
'edit-user-title' => 'Edit User',
|
||||
'save-btn-title' => 'Save User',
|
||||
|
|
@ -161,6 +163,7 @@ return [
|
|||
],
|
||||
'settings' => [
|
||||
'locales' => [
|
||||
'title' => 'Locales',
|
||||
'add-locale-title' => 'Add Locale',
|
||||
'edit-locale-title' => 'Edit Locale',
|
||||
'add-title' => 'Add Locale',
|
||||
|
|
@ -170,6 +173,7 @@ return [
|
|||
'name' => 'Name'
|
||||
],
|
||||
'countries' => [
|
||||
'title' => 'Countries',
|
||||
'add-title' => 'Add Counrty',
|
||||
'save-btn-title' => 'Save Counrty',
|
||||
'general' => 'General',
|
||||
|
|
@ -177,6 +181,7 @@ return [
|
|||
'name' => 'Name'
|
||||
],
|
||||
'currencies' => [
|
||||
'title' => 'Currencies',
|
||||
'add-title' => 'Add Currency',
|
||||
'edit-title' => 'Edit Currency',
|
||||
'save-btn-title' => 'Save Currency',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.settings.channels.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.settings.countries.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.settings.currencies.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.settings.exchange_rates.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.settings.inventory_sources.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.settings.locales.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.users.roles.title') }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="page-action">
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
{!! $datagrid->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
|
||||
<h1>{{ __('admin::app.users.users.title') }}</h1>
|
||||
</div>
|
||||
<div class="page-action">
|
||||
<a href="{{ route('admin.users.create') }}" class="btn btn-lg btn-primary">
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class CoreServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->registerCoreFacade();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register Bouncer as a singleton.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace Webkul\Core\Repositories;
|
|||
use Webkul\Core\Eloquent\Repository;
|
||||
|
||||
/**
|
||||
* Country Reposotory
|
||||
* Slider Reposotory
|
||||
*
|
||||
* @author Jitendra Singh <jitendra@webkul.com>
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class SliderRepository extends Repository
|
||||
|
|
|
|||
|
|
@ -617,7 +617,8 @@ class DataGrid
|
|||
throw new \Exception('Multiple Search keys Found, Please Resolve the URL Manually.');
|
||||
|
||||
} else {
|
||||
$column_name = $key;
|
||||
// $column_name = $key;
|
||||
$column_name = $this->findAlias($key);
|
||||
if (array_keys($value)[0]=="like" || array_keys($value)[0]=="nlike") {
|
||||
foreach ($value as $condition => $filter_value) {
|
||||
$this->query->where(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use Webkul\Ui\DataGrid\Helpers\Css;
|
|||
use Webkul\Ui\DataGrid\Helpers\MassAction;
|
||||
use URL;
|
||||
|
||||
class DataGridX
|
||||
class ProductGrid
|
||||
{
|
||||
/**
|
||||
* Name of DataGrid
|
||||
|
|
@ -102,13 +102,11 @@
|
|||
data-column-sort="asc">{!! $column->sorting() !!}<span class="icon sort-down-icon"></span>
|
||||
</th>
|
||||
@else
|
||||
<th class="labelled-col grid_head" data-column-name="{{ $column->alias }}" data-column-label="{{ $column->label }}">{!! $column->sorting() !!}</th>
|
||||
<th class="grid_head" data-column-name="{{ $column->alias }}" data-column-label="{{ $column->label }}">{!! $column->sorting() !!}</th>
|
||||
@endif @endforeach
|
||||
@foreach($actions as $action)
|
||||
<th>
|
||||
{{ $action['type'] }}
|
||||
Actions
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $css->tbody }}">
|
||||
|
|
@ -123,13 +121,15 @@
|
|||
@foreach ($columns as $column)
|
||||
<td class="">{!! $column->render($result) !!}</td>
|
||||
@endforeach
|
||||
@foreach($actions as $action)
|
||||
|
||||
<td class="action">
|
||||
<a @if($action['type']=="Edit") href="{{ url()->current().'/edit/'.$result->id }}" @elseif($action['type']=="Delete") href="{{ url()->current().'/delete/'.$result->id }}" @endif class="Action-{{ $action['type'] }}" id="{{ $result->id }}" onclick="return confirm_click('{{ $action['confirm_text'] }}');">
|
||||
<i class="{{ $action['icon'] }}"></i>
|
||||
</a>
|
||||
@foreach($actions as $action)
|
||||
<a @if($action['type']=="Edit") href="{{ url()->current().'/edit/'.$result->id }}" @elseif($action['type']=="Delete") href="{{ url()->current().'/delete/'.$result->id }}" @endif class="Action-{{ $action['type'] }}" id="{{ $result->id }}" onclick="return confirm_click('{{ $action['confirm_text'] }}');">
|
||||
<i class="{{ $action['icon'] }}"></i>
|
||||
</a>
|
||||
@endforeach
|
||||
</td>
|
||||
@endforeach
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue