public function toRestResponse(int$status = 200, array $headers = []): RestResponseContract
	{
		return (new Response())->setData($this->toArray())->setStatus($status)->setHeaders($headers);
	}
public function toRestResponse(int$status = 200, array $headers = []): RestResponseContract
	{
		return (new Response())->setData($this->toArray())->setStatus($status)->setHeaders($headers);
	}
public function toRestResponse ( int $ status = 200 , array $ headers = [ ] ) : RestResponseContract { return ( new Response ( ) ) -> setData ( $ this -> toArray ( ) ) -> setStatus ( $ status ) -> setHeaders ( $ headers ) ; }
Create REST response from entity

@param int $status
@param array $headers

@return RestResponseContract
Create REST response from entity