* @author Connor S. Parks */ class StatusComposer { /** * The system instance. * * @var \CachetHQ\Cachet\Integrations\Contracts\System */ protected $system; /** * Create a new status composer instance. * * @param \CachetHQ\Cachet\Integrations\Contracts\System $system * * @return void */ public function __construct(System $system) { $this->system = $system; } /** * Bind data to the view. * * @param \Illuminate\Contracts\View\View $view * * @return void */ public function compose(View $view) { $status = $this->system->getStatus(); $view->withSystemStatus(array_get($status, 'system_status')); $view->withSystemMessage(array_get($status, 'system_message')); } }