/** * @param int|string $mountId * * @return Instance */ protected static function findMount($mountId) { return Mount::byNameOrId($mountId)->firstOrFail(); }
/** * @return array */ protected function gatherConsoleStatistics() { $_stats = ['uri' => config('app.url', \Request::getSchemeAndHttpHost()), 'user' => ServiceUser::count(), 'mount' => Mount::count(), 'server' => Server::count(), 'cluster' => Cluster::count(), 'limit' => Limit::count(), 'instance' => Instance::count()]; return $_stats; // The new way //return $this->telemetry->make('console')->getTelemetry(); }
/** * Create a mount * * @param $mountId * * @return bool|\DreamFactory\Enterprise\Database\Models\Mount */ protected function _createMount($mountId) { if (false === ($_data = $this->_prepareData($mountId))) { return false; } $_mount = Models\Mount::create($_data); $this->concat('mount id ')->asComment($mountId)->flush(' created.'); return $_mount; }