I have a api in laravel and I want return validation errors in user's language. how can I specify language in laravel api? for example response this :
if ($validator->fails()) {
return response()->json([
'errors' => $validator->getMessageBag()->getMessages(),
], 400);
}
return best for each language. fa and en.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire