소스 검색

Merge pull request #543 from 1day2die/development

Development
Dennis 2 년 전
부모
커밋
b473cf96b6
2개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      README.md
  2. 13 0
      app/Http/Controllers/HomeController.php

+ 1 - 0
README.md

@@ -19,6 +19,7 @@
 ![controlpanel](https://user-images.githubusercontent.com/45005889/123518824-06b05000-d6a8-11eb-91b9-d1ed36bd2317.png)
 ![controlpanel](https://user-images.githubusercontent.com/45005889/123518824-06b05000-d6a8-11eb-91b9-d1ed36bd2317.png)
 
 
 
 
+[//]: ![](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fmarket.controlpanel.gg%2Fcallhome.php%3Fgetinstalls)
 ![](https://img.shields.io/github/stars/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/forks/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/tag/ControlPanel-gg/dashboard) [![Crowdin](https://badges.crowdin.net/controlpanelgg/localized.svg)](https://crowdin.com/project/controlpanelgg) ![](https://img.shields.io/github/issues/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/license/ControlPanel-gg/dashboard) ![](https://img.shields.io/discord/787829714483019826)
 ![](https://img.shields.io/github/stars/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/forks/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/tag/ControlPanel-gg/dashboard) [![Crowdin](https://badges.crowdin.net/controlpanelgg/localized.svg)](https://crowdin.com/project/controlpanelgg) ![](https://img.shields.io/github/issues/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/license/ControlPanel-gg/dashboard) ![](https://img.shields.io/discord/787829714483019826)
 ## About
 ## About
 
 

+ 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', 'This is only used to count the installations of cpgg.');
+    }
+
     /**
     /**
      * @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([