original_string: public function firstOrCreate(array $attributes = [])
      {
          $model = $this->first();
          if (!$model) {
              $model = $this->create($attributes);
          }
          return $model;
      }
code: public function firstOrCreate(array $attributes = [])
      {
          $model = $this->first();
          if (!$model) {
              $model = $this->create($attributes);
          }
          return $model;
      }
code_tokens: public function firstOrCreate ( array $ attributes = [ ] ) { $ model = $ this -> first ( ) ; if ( ! $ model ) { $ model = $ this -> create ( $ attributes ) ; } return $ model ; }
docstring: Find first or create record.
  
  @param array $attributes additional attributes to create the record with.
  @return object
docstring_tokens: Find first or create record .