connelblaze's avatar

Returns 404 on /dashboard

new to Laravel, following a tutorial that uses version 7, saw that a lot of changes where made

Got to the auth part and that's where all hell was loose

First i did this: php artisan ui vue

Then I did: php artisan ui vue --auth

ran: npm install

and then ran: npm run dev

Found out that it didn't display the Login/register on the page and when I tried visiting the route I had 404 error

Did some reading and discovered jetstream

I now deleted everything that had to do with vue and even the node_modules

I ran: composer require laravel/jetstream

did: php artisan jetstream:install livewire

ran: npm install

did: php artisan migrate

and started the server

It didn't display the login/register route but i could access the route

I tried registering a new user but when it redirected me to /dashboard it shows 404 error

0 likes
10 replies
sr57's avatar

npm run dev?

What do you mean by "It didn't display the login/register route but i could access the route" ?

What shows : php artisan route:list?

connelblaze's avatar

In tutorials I see that those links automatically appears on the index page

Mine didn't but I could access the routes

php artisan route:list shows list of routes

sr57's avatar

You should have the register and login buttons in the upper rigth.

Have a look in your log and look at the source code of the html page.

connelblaze's avatar

I didn't see it

Like i did my own layouts and index, but it's added in welcome page

Still the /dashboard shows 404 error

Varrah's avatar

Same thing here. Routes are shown, even register and login forms are working correctly, but dashboard gives out 404. Looks like a problem with routing. Can it be that the default routing should be removed before installing jetstream? Since the

Route::get('/', function () {
    return view('welcome');
});

code actually works and the welcome page opens, but there's no instructions on the login/register/dashboard pages in the routes and tutorials and "quick start" manuals do not cover anything about it. @connelblaze were you able to resolve your issue?

Varrah's avatar

Looks like to be healed by php artisan route:clear and php artisan vendor:publish --tag=jetstream-routes but now the dashboard template doesn't get the authenticated user data. Seems that there's general misconfiguration on some initial step... :-(

Varrah's avatar

Yeah, so I had to completely remove all the files generated by composer/npm and restart the whole thing from scratch (empty dir) and then it finally worked. Still do not know what was the reason for these errors (and that frightens me) :-(

gkarthikkumar's avatar

Hello,

We have created the Larvel project for Laravel Jetstream Livewire. We are deploying this Laravel app in Nginx ubuntu serve by Ci/CD method. Jetstream Login and Register pages are working fine. But Jetstream Dashboard page is showing as 404 error.

This same Laravel Project working fine in Plesk Apache server.

Please check and provide the solution right away.

Thanks.

Please or to participate in this conversation.