private function resolveModelName($model) {
        if ($model instanceof Controller) {
            $exploded = explode('\\', get_class($model));
            $controllerName = array_pop($exploded);
            return str_singular(str_replace('Controller', '', $controllerName));
        } else if ($model instanceof Eloquent) {
            return get_class($model);
        } else {
            return $model;
        }
    }