2020-02-24 01:23:19 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Composers;
|
|
|
|
|
2020-03-29 01:03:52 +08:00
|
|
|
use App\Contracts\Composer;
|
2020-02-24 01:23:19 +08:00
|
|
|
use App\Services\VersionService;
|
|
|
|
use Illuminate\View\View;
|
|
|
|
|
2020-03-29 01:03:52 +08:00
|
|
|
class VersionComposer extends Composer
|
2020-02-24 01:23:19 +08:00
|
|
|
{
|
|
|
|
protected $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));
|
|
|
|
}
|
|
|
|
}
|