src/Traits/Auditable.php
public function scopeOfCreator(Builder $builder, Model $user): Builder
    {
        return $builder->where('created_by_type', $user->getMorphClass())->where('created_by_id', $user->getKey());
    }
public function scopeOfCreator(Builder $builder, Model $user): Builder
    {
        return $builder->where('created_by_type', $user->getMorphClass())->where('created_by_id', $user->getKey());
    }
public function scopeOfCreator ( Builder $ builder , Model $ user ) : Builder { return $ builder -> where ( 'created_by_type' , $ user -> getMorphClass ( ) ) -> where ( 'created_by_id' , $ user -> getKey ( ) ) ; }
Get audits of the given creator.

@param \Illuminate\Database\Eloquent\Builder $builder
@param \Illuminate\Database\Eloquent\Model   $user

@return \Illuminate\Database\Eloquent\Builder
Get audits of the given creator .