`scene`方法可用于區分不同的驗證場景,如:注冊、登錄、重置密碼等。
```
use lunzi\TpSms;
```
## 生成登錄(login)場景的驗證碼并緩存
```
$code = (new TpSms())->scene('login')->create();
```
## 驗證登錄(login)場景短信驗證碼
```
$tpSms = new TpSms();
if(! $tpSms->scene('login')->check()){
//驗證失敗,獲取失敗信息
$msg = $tpSms->getErrorMsg();
}
```