w3bdeveloper7 / task Goto Github PK
View Code? Open in Web Editor NEW1- Make an api endpoint with post method to receive body in the request, encrypted with laravel framework, this body will have an encrypted data with mcrypt method and will refer to this json data { "code" : 0 } or { "code" : 1 } after decryption. 2-Then decrypt this request outside the action like "middleware". 3- If the request's code equals 0, return this json {"message":"success"} 4- If the code equals 1, return {"message":"failure"}. 5- Encrypt your return after the action not inside it.