phpvms/app/Http/Controllers/Admin/DashboardController.php

34 lines
755 B
PHP
Raw Normal View History

2017-06-11 09:27:24 +08:00
<?php
namespace App\Http\Controllers\Admin;
2017-12-04 00:55:01 +08:00
use App\Repositories\PirepRepository;
2017-06-11 09:27:24 +08:00
use Illuminate\Http\Request;
2017-06-11 11:17:45 +08:00
class DashboardController extends BaseController
2017-06-11 09:27:24 +08:00
{
2017-12-04 00:55:01 +08:00
private $pirepRepo;
public function __construct(
PirepRepository $pirepRepo
) {
$this->pirepRepo = $pirepRepo;
}
2017-06-11 09:27:24 +08:00
/**
* Display a listing of the Airlines.
*/
public function index(Request $request)
{
2017-08-18 03:01:47 +08:00
/*Feed::$cacheDir = storage_path('app');
Feed::$cacheExpire = '5 hours';
2017-08-18 03:01:47 +08:00
$feed = Feed::loadRss(config('phpvms.feed_url'));*/
$feed = [];
2017-08-19 01:02:32 +08:00
return view('admin.dashboard.index', [
'feed' => $feed,
2017-12-04 00:55:01 +08:00
'pending_pireps' => $this->pirepRepo->getPendingCount(),
]);
2017-06-11 09:27:24 +08:00
}
}