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

Gatemark's avatar

Laravel redirects a user to a page after Authentication and automatically trigger an Ajax call for dashboard.blade.php

Hi guys how can i make laravel redirect a user after Registration or Login to a page, that in turn sends an AJAX call for the dashboard...please guys i need your methods

0 likes
3 replies
jekinney's avatar

Just redirect in the applicable controller method. The ajax call is JavaScript? If so the page (dashboard) handles the call in the JavaScript.

Gatemark's avatar

my problem is how will i make php communicate with the javascript to make the AJAX call?

Gatemark's avatar

Let say after laravel(php) have redirected user to the page, it tells Javascript to make ajax call for dashboard does this sound feasible? or does it make sense?

Please or to participate in this conversation.