protected function checkBuilderType($builder)
{
//keeps clients from setting the builder to anything that isn't an Eloquent
//Builder or an Model
if (!$builder instanceof Builder && !$builder instanceof Model) {
throw new Exception('builder must be instance of Illuminate\\Database\\Eloquent\\Model or Illuminate\\Database\\Eloquent\\Builder');
}
}