original_string: protected function attributesThatHaveMessages()
      {
          return collect($this->messages()->toArray())->map(function ($message, $key) {
              return explode('.', $key)[0];
          })->unique()->flip()->all();
      }
code: protected function attributesThatHaveMessages()
      {
          return collect($this->messages()->toArray())->map(function ($message, $key) {
              return explode('.', $key)[0];
          })->unique()->flip()->all();
      }
code_tokens: protected function attributesThatHaveMessages ( ) { return collect ( $ this -> messages ( ) -> toArray ( ) ) -> map ( function ( $ message , $ key ) { return explode ( '.' , $ key ) [ 0 ] ; } ) -> unique ( ) -> flip ( ) -> all ( ) ; }
docstring: Generate an array of all attributes that have messages.
  
  @return array
docstring_tokens: Generate an array of all attributes that have messages .