Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@
namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Inertia\Inertia;

class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Register any application services.
*/
public function register(): void
{
//
}

/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Inertia::share([
'environment' => [
'name' => app()->environment(),
'is_preprod' => app()->environment('staging', 'preprod', 'local'),
],
]);
}
}
5 changes: 1 addition & 4 deletions resources/js/Components/NetworkNotice.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<script setup>
import {computed} from "vue";

const appEnv = import.meta.env.VITE_APP_ENV || 'production'
const isPreprod = computed(() => appEnv === 'preprod')
</script>
<template>
<v-system-bar window
v-if="isPreprod"
v-if="$page.props.environment?.is_preprod"
color="warning"
density="compact"
class="align-center">
Expand Down