You need to return an array or object in the controller. Laravel will convert this to JSON.
return CreateNewUser($request);
protected function CreateNewUser($request)
{
/** Your code for processing the new user here **/
return ['success' => true, 'message' => 'New user created !!'];
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community