2020-04-29 02:20:00 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2020-10-21 00:29:50 +00:00
|
|
|
use Illuminate\Http\Request;
|
2020-10-21 00:01:41 +00:00
|
|
|
use App\Vacancy;
|
2020-10-21 00:29:50 +00:00
|
|
|
use App\User;
|
|
|
|
use App\Ban;
|
|
|
|
use App\Application;
|
2020-04-29 02:20:00 +00:00
|
|
|
|
|
|
|
class DashboardController extends Controller
|
|
|
|
{
|
2020-10-21 00:29:50 +00:00
|
|
|
|
2020-04-29 02:20:00 +00:00
|
|
|
public function index()
|
|
|
|
{
|
2020-06-27 03:49:55 +00:00
|
|
|
$totalPeerReview = Application::where('applicationStatus', 'STAGE_PEERAPPROVAL')->get()->count();
|
|
|
|
$totalNewApplications = Application::where('applicationStatus', 'STAGE_SUBMITTED')->get()->count();
|
|
|
|
$totalDenied = Application::where('applicationStatus', 'DENIED')->get()->count();
|
|
|
|
|
|
|
|
return view('dashboard.dashboard')
|
|
|
|
->with([
|
2020-10-21 00:29:50 +00:00
|
|
|
'vacancies' => Vacancy::all(),
|
|
|
|
'totalUserCount' => User::all()->count(),
|
|
|
|
'totalDenied' => $totalDenied,
|
|
|
|
'totalPeerReview' => $totalPeerReview,
|
|
|
|
'totalNewApplications' => $totalNewApplications
|
2020-06-27 03:49:55 +00:00
|
|
|
]);
|
2020-10-21 00:29:50 +00:00
|
|
|
|
2020-04-29 02:20:00 +00:00
|
|
|
}
|
2020-10-21 00:29:50 +00:00
|
|
|
|
2020-04-29 02:20:00 +00:00
|
|
|
}
|