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

Kango's avatar

Laravel 5.1 ajax based login/registration using Auth controller?

I am learning laravel framework. I have some question while learning authenticatation (https://laravel.com/docs/5.1/authentication).

I have tried login and registrartion by refering laravel Authentication.

Now want to make login and registartion using ajax. My question is do I need to write new controller and method for login and registration because need return data in json format to display validation message or redirect after login.
OR
Is there any way We can use same AUthentication controller and method to work with ajax. Please suggest appropriate solution ?

0 likes
0 replies

Please or to participate in this conversation.