コード例 #1
0
 /**
  * @param int|string $mountId
  *
  * @return Instance
  */
 protected static function findMount($mountId)
 {
     return Mount::byNameOrId($mountId)->firstOrFail();
 }
コード例 #2
0
 /**
  * @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();
 }
コード例 #3
0
ファイル: Mount.php プロジェクト: rajeshpillai/dfe-console
 /**
  * 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;
 }