示例#1
0
 /**
  * Overwrite parents create to set a default approval state.
  * 
  * @param static
  */
 public static function create(array $attributes = [])
 {
     if (!array_key_exists('approved', $attributes)) {
         $attributes['approved'] = config('kurt_modules.blog.preapproved_comments');
     }
     return parent::create($attributes);
 }
示例#2
0
 /**
  * The "booting" method of the model.
  *
  * @return void
  */
 public static function boot()
 {
     parent::boot();
     self::observe(new TagObserver());
 }