Cachet/app/Composers/DashboardComposer.php

31 lines
680 B
PHP
Raw Normal View History

<?php
/*
* This file is part of Cachet.
*
2015-07-06 17:37:01 +01:00
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Composers;
use CachetHQ\Cachet\Models\Component;
2015-03-06 08:14:47 +00:00
use CachetHQ\Cachet\Models\Incident;
2015-06-01 11:45:48 +01:00
use Illuminate\Contracts\View\View;
class DashboardComposer
{
/**
* Bind data to the view.
*
2015-06-01 11:45:48 +01:00
* @param \Illuminate\Contracts\View\View $view
*/
public function compose(View $view)
{
$view->withIncidentCount(Incident::notScheduled()->count());
$view->withComponentCount(Component::all()->count());
}
}