refactoring of admin datatables
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\ArticlesDataTable;
|
||||
use App\Datatables\Admin\Shop\ArticlesDataTable;
|
||||
use App\Repositories\Shop\ArticleNatures;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\Categories;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\ArticleNaturesDataTable;
|
||||
use App\Datatables\Admin\Shop\ArticleNaturesDataTable;
|
||||
use App\Repositories\Shop\ArticleNatures;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\DeliveriesDataTable;
|
||||
use App\Datatables\Admin\Shop\DeliveriesDataTable;
|
||||
use App\Repositories\Shop\Deliveries;
|
||||
use App\Repositories\Shop\SaleChannels;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -11,14 +11,14 @@ class DeliveryController extends Controller
|
||||
{
|
||||
public function index(DeliveriesDataTable $dataTable)
|
||||
{
|
||||
$data = [];
|
||||
|
||||
return $dataTable->render('Admin.Shop.Deliveries.list', $data);
|
||||
return $dataTable->render('Admin.Shop.Deliveries.list');
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$data['sale_channels'] = SaleChannels::getOptions();
|
||||
$data = [
|
||||
'sale_channels' => SaleChannels::getOptions(),
|
||||
];
|
||||
|
||||
return view('Admin.Shop.Deliveries.create', $data);
|
||||
}
|
||||
@@ -32,15 +32,19 @@ class DeliveryController extends Controller
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$data['delivery'] = Deliveries::get($id);
|
||||
$data = [
|
||||
'delivery' => Deliveries::get($id),
|
||||
];
|
||||
|
||||
return view('Admin.Shop.Deliveries.view', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$data['delivery'] = Deliveries::get($id)->toArray();
|
||||
$data['sale_channels'] = SaleChannels::getOptions();
|
||||
$data = [
|
||||
'delivery' => Deliveries::get($id)->toArray(),
|
||||
'sale_channels' => SaleChannels::getOptions(),
|
||||
];
|
||||
|
||||
return view('Admin.Shop.Deliveries.edit', $data);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\InvoicesDataTable;
|
||||
use App\Datatables\Admin\Shop\InvoicesDataTable;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\Invoices;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\OffersDataTable;
|
||||
use App\Datatables\Admin\Shop\OffersDataTable;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\ArticleNatures;
|
||||
use App\Repositories\Shop\Articles;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\OrdersDataTable;
|
||||
use App\Datatables\Admin\Shop\OrdersDataTable;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\Orders;
|
||||
use App\Repositories\Shop\OrderMails;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin\Shop;
|
||||
|
||||
use App\Datatables\Shop\SaleChannelsDataTable;
|
||||
use App\Datatables\Admin\Shop\SaleChannelsDataTable;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\SaleChannels;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
Reference in New Issue
Block a user