-
app/Providers/AppServiceProvider.php
Open in GitHubuse App\Helper; use App\Models\Space; use Illuminate\Support\ServiceProvider; use Auth; class AppServiceProvider extends ServiceProvider { public function boot() { view()->composer('*', function ($view) { $selectedSpace = session('space_id') ? Space::find(session('space_id')) : null; $versionFileExists = file_exists(base_path() . '/version.txt'); $versionNumber = $versionFileExists ? file_get_contents(base_path() . '/version.txt') : '-'; $view->with([ 'userName' => Auth::check() ? Auth::user()->name : null, 'currency' => $selectedSpace ? $selectedSpace->currency->symbol : '-', 'selectedSpace' => $selectedSpace, 'arePlansEnabled' => Helper::arePlansEnabled(), 'suggestionBoxEnabled' => env('SUGGESTION_BOX_ENABLED', false), 'versionNumber' => $versionNumber ]); }); } // }
-
resources/views/layout.blade.php
Open in GitHub// @if ($suggestionBoxEnabled) <a class="fs-sm" href="/ideas/create">{{ __('general.got_a_suggestion') }}?</a> · {{ $versionNumber }} @else {{ $versionNumber }} @endif //