Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jtsdev's avatar

Active Links - Laravel/Jetstream

I am doing the Inertia module on Laracasts but having terrible trouble making progress. I followed the Jetstream approach suggested in the comments of a few videos and seemed to get everything working but various issues keep coming up. I am using the standard commands to start my local servers

npm run dev
php artisan serve

At first I noticed that tailwind styles were only getting applied to some elements and not others specifically margin seemed to be getting applied but bold and size were not getting applied. I tried restarting the servers and it seemed to work but eventually when I commented out the default Fonts section in views/app.blade.php it seemed to be working ok again. But today more issues.

:class="{
                        'font-bold underline': $page.component == '/users',
                    }"
:class="{
                        'font-bold underline':
                            $page.url.startsWith('/settings'),
                    }"

I am trying to apply these styles dynamicaly within the Nav component. The second seems to work but the first does not. I have the expected tree structure: Root->Inertia->[component] where I have 3 components /, /users and /settings. But when you click on the inertia component no matter that the correct component is below in the structure the values for component and url within inertia are shown as the ones that I was on when I restart my local servers. Not sure if this explains why the $page.url seems to work but the $page.component does not.

0 likes
2 replies
jtsdev's avatar

Tried "composer update" and it has now fully broken the app. The button to go to the users page was not responding and when I manually input the url was thrown this error

Exception
PHP 8.1.12
10.26.2
Unable to locate file in Vite manifest: resources/js/Pages/Users.vue.
 @vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
$ composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 0 installs, 3 updates, 0 removals
  - Upgrading egulias/email-validator (4.0.1 => 4.0.2)
  - Upgrading phpunit/phpunit (10.3.5 => 10.4.0)
  - Upgrading tightenco/ziggy (v1.7.2 => v1.8.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 3 updates, 0 removals
  - Downloading egulias/email-validator (4.0.2)
  - Downloading phpunit/phpunit (10.4.0)
  - Downloading tightenco/ziggy (v1.8.0)
  - Upgrading egulias/email-validator (4.0.1 => 4.0.2): Extracting archive
  - Upgrading phpunit/phpunit (10.3.5 => 10.4.0): Extracting archive
  - Upgrading tightenco/ziggy (v1.7.2 => v1.8.0): Extracting archive
Generating optimized autoload files
jtsdev's avatar

This was in response to the AI answer. I have subsequently tried Breeze and came across the same issue and have just moved on as I cant get the $page.component method to work. But if anybody knows what I have done wrong or thinks I should open a bug report please let me know.

Please or to participate in this conversation.