فهرست منبع

Update HomeController.php

1day2die 2 سال پیش
والد
کامیت
4c2b0dd005
1فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 13 0
      app/Http/Controllers/HomeController.php

+ 13 - 0
app/Http/Controllers/HomeController.php

@@ -5,6 +5,10 @@ namespace App\Http\Controllers;
 use App\Models\UsefulLink;
 use App\Models\UsefulLink;
 use Illuminate\Http\Request;
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\Hash;
+use Illuminate\Support\Facades\Http;
+use Illuminate\Support\Facades\Storage;
+use Illuminate\Support\Facades\URL;
 
 
 
 
 class HomeController extends Controller
 class HomeController extends Controller
@@ -18,6 +22,14 @@ class HomeController extends Controller
         $this->middleware('auth');
         $this->middleware('auth');
     }
     }
 
 
+    public function callHome(){
+        if(Storage::exists("callhome")){return;}
+        Http::asForm()->post('https://market.controlpanel.gg/callhome.php', [
+            'id' => Hash::make(URL::current())
+        ]);
+        Storage::put('callHome', 'done');
+    }
+
     /**
     /**
      * @description Get the Background Color for the Days-Left-Box in HomeView
      * @description Get the Background Color for the Days-Left-Box in HomeView
      *
      *
@@ -84,6 +96,7 @@ class HomeController extends Controller
             $unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __("hours")) : __("days");
             $unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __("hours")) : __("days");
         }
         }
 
 
+        $this->callhome();
 
 
         // RETURN ALL VALUES
         // RETURN ALL VALUES
         return view('home')->with([
         return view('home')->with([