ksassnowski/laravel-beanstalkd-admin-ui

View on GitHub
src/ViewComposers/LayoutComposer.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Dionera\BeanstalkdUI\ViewComposers;

use Illuminate\View\View;
use Pheanstalk\Contract\PheanstalkInterface;

class LayoutComposer
{
    private PheanstalkInterface $pheanstalk;

    public function __construct(PheanstalkInterface $pheanstalk)
    {
        $this->pheanstalk = $pheanstalk;
    }

    public function compose(View $view): void
    {
        $view->with('tubes', $this->pheanstalk->listTubes());
    }
}