diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index b4ed62d..1ee9674 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -29,9 +29,6 @@ class AppServiceProvider extends ServiceProvider Inertia::share(function () { return [ - 'app' => [ - 'name' => Config::get('app.name'), - ], 'auth' => [ 'user' => Auth::user() ? [ 'id' => Auth::user()->id, diff --git a/resources/js/Pages/Auth/Login.vue b/resources/js/Pages/Auth/Login.vue index 357f60d..e7dfec3 100644 --- a/resources/js/Pages/Auth/Login.vue +++ b/resources/js/Pages/Auth/Login.vue @@ -47,7 +47,7 @@ export default { } }, mounted() { - document.title = `Login | ${this.$page.app.name}` + document.title = 'Login | Ping CRM' }, methods: { submit() { diff --git a/resources/js/Shared/Layout.vue b/resources/js/Shared/Layout.vue index db1f193..ab68dea 100644 --- a/resources/js/Shared/Layout.vue +++ b/resources/js/Shared/Layout.vue @@ -72,17 +72,14 @@ export default { } }, watch: { - title(title) { - this.updatePageTitle(title) + title: { + immediate: true, + handler(title) { + document.title = title ? `${title} | Ping CRM` : 'Ping CRM' + }, }, }, - mounted() { - this.updatePageTitle(this.title) - }, methods: { - updatePageTitle(title) { - document.title = title ? `${title} | ${this.$page.app.name}` : this.$page.app.name - }, hideDropdownMenus() { this.showUserMenu = false },