# TP6中,把自己写的类放到工厂中去 1。配置 app\\provider.php 文件。 ``` return [ 'think\Request' => Request::class, 'think\exception\Handle' => ExceptionHandle::class, 'sms' => \test\AliSms::class, //这里 ]; ``` 2。使用。 ``` app()->sms->send('1397123123', 'hello world'); ```