App\Http\Middleware\LoginAs::canLoginAs PHP 메소드

canLoginAs() 보호된 메소드

protected canLoginAs ( ) : boolean
리턴 boolean
    protected function canLoginAs() : bool
    {
        // Just to be sure...
        if (!app()->environment('local')) {
            return false;
        }
        if (!ends_with(request()->getHost(), '.dev')) {
            return false;
        }
        if (!in_array(env('DB_USERNAME'), ['homestead', 'root'])) {
            return false;
        }
        return true;
    }