forked from miguel456/rbrecruiter
Add save & update functionality to positions
Tooltips also added, as well as a general configuration file for Mojang Status URL. Relationships were also added between forms and Vacancies. Status verification for the dashboard was moved to a Service Provider, where it adds log entries when cache expires. Authentication controllers were also updated to reflect the new dashboard URL.
This commit is contained in:
@@ -5,23 +5,14 @@ namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
|
||||
public function index()
|
||||
{
|
||||
// TODO: Switch status checking to provider, share with all views
|
||||
|
||||
// Mojang status for informational purposes
|
||||
if (!Cache::has('mojang_status'))
|
||||
{
|
||||
$mcstatus = Http::get('https://status.mojang.com/check');
|
||||
Cache::put('mojang_status', base64_encode($mcstatus->body()), now()->addMinutes(60));
|
||||
}
|
||||
|
||||
return view('dashboard.dashboard')
|
||||
->with('mcstatus', json_decode(base64_decode(Cache::get('mojang_status')), true));
|
||||
return view('dashboard.dashboard');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user