Results 14 comments of WeiQi

use `DB::connection('mongodb')->getMongoClient()` to access original [MongoDB\Driver](http://php.net/manual/en/mongodb-driver-session.starttransaction.php) and use `DB::connection('mongodb')->getMongoClient()->startSession()` to create a session and then start a transaction.

mongo transaction is a little different from mysql. you need to create a session first, and pass this session as a option when you do update.

**pass this session as a option** when you do update. ```php $session = MongoDB::startSession(); $session->startTransaction(); try { Player::document()->update($updates, ['session' => $session]); $session->commitTransaction(); return true; } catch (\Exception $e) { $session->abortTransaction();...

@leoku7020 you should do update on the mongo *document* object (not the model)

words has different lengths and font-sizes. the code above will actually cause a text overlap. I hope someone will introduce a good way to blink them in appropriate position.

其实一开始可以不需要那么复杂,只需要可以自定义配置文件路径即可。 像dropbox和icloud这样的服务,他们会监控目录变化做文件同步,这样switchhost就可以免去账号系统及系统兼容的工作

@quetzalsly why not pick one and try translate it? I think you'll enjoy the feeling. we are always here for help.

Here's mine `ycgambo.css` ![pic](https://user-images.githubusercontent.com/23355083/42809922-4785eb26-89e9-11e8-9005-92277773da0f.png) ```css body {font-family:"Courier New",Courier,monospace;line-height:1.75em;font-size:16px;color:#282828;background-color:#fff;}h1,h2,h3{font-family:"Comic Sans MS",cursive,sans-serif;}h1 {font-size:1.875em;line-height:2.125em;}h2 {font-size:1.25em;line-height:1.5625em;}h3 {font-size:1.14em;line-height:1.7em;padding-top:0.9375em;padding-bottom:0.9375em;border-bottom:1px solid #D8D8D8;}hr {height:1px;background-color:#D8D8D8;border:none;width:100%;margin:0px;}a[href] {color:#27AAE1;text-decoration:none;}a[href]:hover {color:#4ECAFF;}.youtubeContainer {position:relative;width:100%;height:0;padding-bottom:56.25%;padding-top:25px;}iframe[src *= "youtube.com/embed/"] {width:100%;height:100%;position:absolute;top:0;left:0;}img {max-width:100%;}li {line-height:1.5em;}td {padding:3px 7px;}table {border-collapse:collapse}tbody {border-top:1px solid black;border-bottom:1px...

用账号密码的,多半是因为怕token过期。 建议写个脚本远程获取refresh_token, 可以托管到github或者gitee上。 过期了更新一下文件就可以了。这是我目前在用的方案

@PKC278 脚本因操作系统和场景而异,我只是提供一个思路。 具体如下: 1. 按README说明获取token 2. 将token作为文件上传到开放网络中 3. 脚本读取此文件,刷新本地token 这样就可以做到token失效时,同步到到其它机器上相对方便点。但是还是需要人工操作 或者可以选择尝试下 sbwml 的方案