add status in opname datatable with order by created at desc

This commit is contained in:
2025-06-10 19:12:21 +07:00
parent 51079aa567
commit 84fb7ffb52
7 changed files with 32 additions and 9 deletions

View File

@@ -26,7 +26,8 @@ class ProductsController extends Controller
{
$menu = Menu::where('link','products.index')->first();
if($request->ajax()){
$data = Product::with(['category', 'stocks']);
$data = Product::with(['category', 'stocks'])
->orderBy('id', 'desc');
return DataTables::of($data)
->addIndexColumn()
->addColumn('category_name', function ($row) {