Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use appName directly from .env in <title> #1329

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

domnantas
Copy link
Contributor

Currently, appName in app.tsx is pulled via DOM from app.blade.php <title> tag. It works, but using it from .env seems like a better approach. Additionally, it serves as an example of how .env variables should be accessed in React/Vue.

The ssr template had 'Laravel' hardcoded as the app name, which is not great for SEO. Replaced that part with import.meta.env.VITE_APP_NAME as well.

This depends on laravel/laravel#6204 where I added VITE_APP_NAME as an alias to APP_NAME

I don't think any changes in this PR could be considered breaking.

Similar issue fixed in Breeze: laravel/breeze#292

Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this as it allows to set a different app name for when you're working in different environments.

@taylorotwell taylorotwell marked this pull request as draft June 20, 2023 12:06
Copy link
Member

@jessarcher jessarcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement!

@driesvints driesvints marked this pull request as ready for review June 21, 2023 07:04
@taylorotwell taylorotwell merged commit 1e3f32e into laravel:3.x Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants