From 0937e810ea2bc9f99eb05b3cfbbce2c8c31419a6 Mon Sep 17 00:00:00 2001 From: 7IN0SAN9 Date: Sat, 2 Jun 2018 16:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=20Laravel=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Laravel 5.5 开始支持 Auto-Discovery,可以省去添加 providers 和 aliases 的步骤 --- README.md | 2 ++ composer.json | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index a760680..4823229 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,8 @@ Sms::voice('02343') * 服务提供器 +*在 Laravel 5.5 以上版本中可以略过本步* + ```php //服务提供器 'providers' => [ diff --git a/composer.json b/composer.json index 50d1b69..8bedcb1 100644 --- a/composer.json +++ b/composer.json @@ -36,5 +36,15 @@ "classmap": [ "tests/" ] + }, + "extra": { + "laravel": { + "providers": [ + "Toplan\\PhpSms\\PhpSmsServiceProvider" + ], + "aliases": { + "PhpSms": "Toplan\\PhpSms\\Facades\\Sms" + } + } } }