Barryvdh\LaravelIdeHelper\Generator::getDriver PHP Method

getDriver() public method

Get the driver/connection/store from the managers
public getDriver ( $alias ) : array | boolean | string
$alias
return array | boolean | string
    public function getDriver($alias)
    {
        try {
            if ($alias == "Auth") {
                $driver = \Auth::driver();
            } elseif ($alias == "DB") {
                $driver = \DB::connection();
            } elseif ($alias == "Cache") {
                $driver = get_class(\Cache::driver());
                $store = get_class(\Cache::getStore());
                return array($driver, $store);
            } elseif ($alias == "Queue") {
                $driver = \Queue::connection();
            } else {
                return false;
            }
            return get_class($driver);
        } catch (\Exception $e) {
            $this->error("Could not determine driver/connection for {$alias}.");
            return false;
        }
    }