phpvms/app/Http/Composers/VersionComposer.php
Nabeel S 12848091a2
Laravel 9 Update (#1413)
Update to Laravel 9 and PHP 8+

Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
2022-03-14 11:45:18 -04:00

24 lines
536 B
PHP

<?php
namespace App\Http\Composers;
use App\Contracts\Composer;
use App\Services\VersionService;
use Illuminate\View\View;
class VersionComposer extends Composer
{
protected VersionService $versionSvc;
public function __construct(VersionService $versionSvc)
{
$this->versionSvc = $versionSvc;
}
public function compose(View $view)
{
$view->with('version', $this->versionSvc->getCurrentVersion(false));
$view->with('version_full', $this->versionSvc->getCurrentVersion(true));
}
}