From the course: Building a Website with Laravel, React.js, and Inertia
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Changing the website title - Laravel Tutorial
From the course: Building a Website with Laravel, React.js, and Inertia
Changing the website title
- [Instructor] Our title is broken right now as it shows dash Laravel. Something is obviously missing there, and that's because the app name is Laravel, but we haven't set a title of our website yet. Since Inertia apps are rendered within the documents body, as you can see here in the app.blade.php file, they cannot render markup in the documents head as it's outside of their scope. There are a couple of ways to set the title of our website. We could do it in the upload JSX file, and we could override the variables title and app name with whatever title we want our website to have. That would work, or we could use in initials head component, which can be used to set what you would normally set in the head component of the website, for example, the page title or meta text. Let's revert this back to what it used to be and use these variables to dynamically change the title's website. The app name is the value defined in the .env file, which we can update now. The title is the value we…
Contents
-
-
-
-
-
(Locked)
Introduction to Inertia.js1m 16s
-
(Locked)
Getting started with a new Inertia project1m 58s
-
(Locked)
Creating a Post resource2m 29s
-
(Locked)
Creating the Home and About pages2m 14s
-
Creating an Inertia navigation2m 6s
-
(Locked)
Changing the website title2m 4s
-
(Locked)
Displaying posts3m 4s
-
(Locked)
Creating posts4m 37s
-
(Locked)
Displaying a single post1m 29s
-
(Locked)
Updating posts1m 51s
-
(Locked)
Deleting posts1m 33s
-
(Locked)
Challenge: Show a flash message1m 2s
-
(Locked)
Solution: Show a flash message2m 59s
-
(Locked)
-