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

suryaprythvi's avatar

Spark user registration and login API's

Hello Laracasts, I am working on a project which has both web interface and API support for mobile APP's. We decided to use the basic registration and login forms given by spark. When trying to create API's, we could not figure out how to do that.

We tried in the following way:

  1. Create a route in "app\Http\api.php" :- Route::post('/user/register', 'userController@registerUser');
  2. And in "registerUser" function, we are trying to insert record in "user" table. But that is not a solution as we will surely miss handling other things like membership, subscriptions etc We are basically trying to replicate OR re-use the register and login web functionalities into API's which can be used my mobile APP.

It would be really helpful if someone can guide us on how to replicate OR re-use the spark web console functionalities to API's which can be used by external applications.

0 likes
1 reply
AtlasApollo's avatar

Hi,

Can you please update this thread on if you found a way to do this?

Thank you, Mike

Please or to participate in this conversation.