Add filters

This commit is contained in:
Ludovic CANDELLIER
2021-04-02 17:42:26 +02:00
parent 46ad2a2917
commit 556f78d0af
6 changed files with 34 additions and 4 deletions

View File

@@ -6,13 +6,15 @@ use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\Shop\Articles;
use App\Repositories\Shop\ArticleFamilies;
use App\DataTables\Shop\ArticlesDataTable;
class ArticleController extends Controller
{
public function index(ArticlesDataTable $dataTable)
{
return $dataTable->render('Shop.Admin.Articles.list');
$data['families'] = ArticleFamilies::getOptions();
return $dataTable->render('Shop.Admin.Articles.list', $data);
}
public function getDatatable(Request $request)

View File

@@ -17,7 +17,8 @@ class PriceGenericController extends Controller
{
public function index(PriceGenericsDataTable $dataTable)
{
return $dataTable->render('Shop.Admin.PriceGenerics.list');
$data['categories'] = PriceGenericCategories::getOptions();
return $dataTable->render('Shop.Admin.PriceGenerics.list', $data);
}
public function getDatatable(Request $request)