diff --git a/composer.json b/composer.json index df19094..ca9fe1b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,10 @@ "laravel": { "providers": [ "Salman\\Mqtt\\MqttServiceProvider" - ] + ], + "aliases": { + "Mqtt": "Salman\\Mqtt\\Facades\\Mqtt" + } } } } diff --git a/src/Facades/Mqtt.php b/src/Facades/Mqtt.php new file mode 100644 index 0000000..a6eb935 --- /dev/null +++ b/src/Facades/Mqtt.php @@ -0,0 +1,20 @@ +app->singleton('Mqtt',function (){ + return new Mqtt(); + }); + } + + /** + * @return array + */ + public function provides() + { + return array('Mqtt'); } }