protected function getHomeDirectory($user)
    {
        $system = strtolower(php_uname());

        if (Str::contains($system, 'darwin')) {
            return "/Users/{$user}";
        } elseif (Str::contains($system, 'windows')) {
            return "C:\\Users\\{$user}";
        } elseif (Str::contains($system, 'linux')) {
            return "/home/{$user}";
        }
    }
protected function getHomeDirectory($user)
    {
        $system = strtolower(php_uname());

        if (Str::contains($system, 'darwin')) {
            return "/Users/{$user}";
        } elseif (Str::contains($system, 'windows')) {
            return "C:\\Users\\{$user}";
        } elseif (Str::contains($system, 'linux')) {
            return "/home/{$user}";
        }
    }
protected function getHomeDirectory ( $ user ) { $ system = strtolower ( php_uname ( ) ) ; if ( Str :: contains ( $ system , 'darwin' ) ) { return "/Users/{$user}" ; } elseif ( Str :: contains ( $ system , 'windows' ) ) { return "C:\\Users\\{$user}" ; } elseif ( Str :: contains ( $ system , 'linux' ) ) { return "/home/{$user}" ; } }
Get the home directory for the user based on OS.

@param  string  $user
@return string|null
Get the home directory for the user based on OS .