src/APIResponse.php
public function respondWithMessageAndPayload($payload = null, $message = "Ok")
    {
        $data = $this->getResponseStructure(true, $payload, $message);
        $reponse = $this->respond($data);
        return $reponse;
    }
public function respondWithMessageAndPayload($payload = null, $message = "Ok")
    {
        $data = $this->getResponseStructure(true, $payload, $message);
        $reponse = $this->respond($data);
        return $reponse;
    }
public function respondWithMessageAndPayload ( $ payload = null , $ message = "Ok" ) { $ data = $ this -> getResponseStructure ( true , $ payload , $ message ) ; $ reponse = $ this -> respond ( $ data ) ; return $ reponse ; }
Use this for responding with messages and payload.

@param null   $payload
@param string $message

@return JsonResponse
Use this for responding with messages and payload .