Files
cachet-docker/app/Composers/ScheduledComposer.php
2019-05-09 08:00:15 +01:00

39 lines
832 B
PHP

<?php
/*
* This file is part of Cachet.
*
* (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\Schedule;
use Illuminate\Contracts\View\View;
/**
* This is the scheduled composer.
*
* @author James Brooks <james@alt-three.com>
* @author Connor S. Parks <connor@connorvg.tv>
*/
class ScheduledComposer
{
/**
* Bind data to the view.
*
* @param \Illuminate\Contracts\View\View $view
*
* @return void
*/
public function compose(View $view)
{
$scheduledMaintenance = Schedule::uncompleted()->orderBy('scheduled_at')->get();
$view->withScheduledMaintenance($scheduledMaintenance);
}
}