original_string: public function firstOrCreate(array $attributes, array $joining = [], $touch = true)
      {
          if (is_null($instance = $this->where($attributes)->first())) {
              $instance = $this->create($attributes, $joining, $touch);
          }
  
          return $instance;
      }
code: public function firstOrCreate(array $attributes, array $joining = [], $touch = true)
      {
          if (is_null($instance = $this->where($attributes)->first())) {
              $instance = $this->create($attributes, $joining, $touch);
          }
  
          return $instance;
      }
code_tokens: public function firstOrCreate ( array $ attributes , array $ joining = [ ] , $ touch = true ) { if ( is_null ( $ instance = $ this -> where ( $ attributes ) -> first ( ) ) ) { $ instance = $ this -> create ( $ attributes , $ joining , $ touch ) ; } return $ instance ; }
docstring: Get the first related record matching the attributes or create it.
  
  @param  array  $attributes
  @param  array  $joining
  @param  bool   $touch
  @return \Illuminate\Database\Eloquent\Model
docstring_tokens: Get the first related record matching the attributes or create it .