parent
commit
23d0b09918
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8
    0
      app/Services/DashboardService.php

+ 8
- 0
app/Services/DashboardService.php Vedi File

@@ -2,11 +2,19 @@
2 2
 
3 3
 namespace App\Services;
4 4
 
5
+use App\Models\StockProduct;
5 6
 use Carbon\Carbon;
6 7
 use Illuminate\Support\Facades\DB;
7 8
 
8 9
 class DashboardService
9 10
 {
11
+    public static function stockProduct()
12
+    {
13
+        StockProduct::where("qty", "<=", "3")
14
+            ->take(5)
15
+            ->get();
16
+    }
17
+
10 18
     public static function productBestSelling()
11 19
     {
12 20
         $query = DB::table("sale_details")