withHeaders([ 'accept' => 'application/json', 'api_token' => config('ecommerce.api.token'), ]); } /** * Add header json */ public function asJson() { return $this->withHeaders([ 'accept' => 'application/json', ]); } }