You have to write the code to sync the users table between the 2 apps
Other solutions :
-
sync directly by the db (need a 'good' knowledge in db)
-
use a sso (ex : https://github.com/zefy/laravel-sso )
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How to develop User Login & Registration from one Laravel project to another Laravel project using API Request ?
You have to write the code to sync the users table between the 2 apps
Other solutions :
sync directly by the db (need a 'good' knowledge in db)
use a sso (ex : https://github.com/zefy/laravel-sso )
Thanks @sr57 . Actually it's not DB issue. Is it possible to use API request in one Laravel system of another Laravel system ?
It's the usage of api ( https://en.wikipedia.org/wiki/API ) with Laravel or not
Thanks @sr57 . Thanks for sharing the link. Could you please show me some code example regarding this ?
I used Laravel API for Vue.js & React.js application before. I can develop API using Laravel also.
Nothing difficult
Route::post('start', 'App\Http\Controllers\GameController@play');
in your code, get your parameters via $request (like web page) , get your confidential data by connecting to the 'input db' and update your 'output db'
public function play( Request $request ) { ...
I have to leave till Monday, try by yourself and ask other specific(s) question(s) if needed.
Not sure if it is what you are looking for, but here an example of how I do api post :
$params = [
'action' => 'activities',
'lang' => 'fr',
'filtre' => $this->filtre,
'index' => $this->index,
'quantity'=>$this->quantity,
'source'=> $this->source,
];
$response = $this->callAPIwithPostV2("/activities",$params);
return $response;
private function callAPIPostCore($path, $parameters, $url = null)
{
if($url == null)
{
$url = env('APP_URL');
}
$addedApiPath = "/api";
$token = env('X_API_KEY');
$headers = [
'Content-Type' => 'application/json',
'X-API-KEY'=> "".$token."",
];
$baseUrl = $url.$addedApiPath;
$url = "".$baseUrl.$path."";
$formParams = $parameters;
$client = new \GuzzleHttp\Client(['headers' => $headers]);
$request = $client->post($url,['form_params' => $formParams]);
return $request;
}
public function callAPIwithPostV2($path, $parameters, $url = null)
{
$request = $this->callAPIPostCore($path, $parameters, $url);
$response = $request->getBody();
return json_decode($response);
}
Please or to participate in this conversation.