original_string: public static function observe($class)
      {
          $className = is_string($class) ? $class : get_class($class);
  
          // When registering a model observer, we will spin through the possible events
          // and determine if this observer has that method. If it does, we will hook
          // it into the model's event system, making it convenient to watch these.
          foreach (static::$observables as $event) {
              if (method_exists($class, $event)) {
                  static::registerModelEvent($event, $className . '@' . $event);
              }
          }
      }
code: public static function observe($class)
      {
          $className = is_string($class) ? $class : get_class($class);
  
          // When registering a model observer, we will spin through the possible events
          // and determine if this observer has that method. If it does, we will hook
          // it into the model's event system, making it convenient to watch these.
          foreach (static::$observables as $event) {
              if (method_exists($class, $event)) {
                  static::registerModelEvent($event, $className . '@' . $event);
              }
          }
      }
code_tokens: public static function observe ( $ class ) { $ className = is_string ( $ class ) ? $ class : get_class ( $ class ) ; // When registering a model observer, we will spin through the possible events // and determine if this observer has that method. If it does, we will hook // it into the model's event system, making it convenient to watch these. foreach ( static :: $ observables as $ event ) { if ( method_exists ( $ class , $ event ) ) { static :: registerModelEvent ( $ event , $ className . '@' . $ event ) ; } } }
docstring: Register an observer with the Model.
  
  @param object|string $class
  
  @return void
docstring_tokens: Register an observer with the Model .