count/filtering of pending PIREPs

This commit is contained in:
Nabeel Shahzad
2017-12-03 10:55:01 -06:00
parent 4c8fca39eb
commit 83cc5111b6
8 changed files with 93 additions and 29 deletions

View File

@@ -2,10 +2,19 @@
namespace App\Http\Controllers\Admin;
use App\Repositories\PirepRepository;
use Illuminate\Http\Request;
class DashboardController extends BaseController
{
private $pirepRepo;
public function __construct(
PirepRepository $pirepRepo
) {
$this->pirepRepo = $pirepRepo;
}
/**
* Display a listing of the Airlines.
*/
@@ -18,6 +27,7 @@ class DashboardController extends BaseController
$feed = [];
return view('admin.dashboard.index', [
'feed' => $feed,
'pending_pireps' => $this->pirepRepo->getPendingCount(),
]);
}
}