Browse Source

Facade

tags/1.0
Maxime Renou 2 years ago
parent
commit
133aaff3e7
  1. 5
      composer.json
  2. 6
      src/Connect.php
  3. 19
      src/Facades/Connect.php

5
composer.json

@ -28,7 +28,10 @@
"laravel": {
"providers": [
"Bluesquare\\Connect\\ConnectServiceProvider"
]
],
"aliases": {
"Connect": "Bluesquare\\Connect\\Facades\\Connect"
}
}
},
"require": {

6
src/Connect.php

@ -5,6 +5,7 @@ namespace Bluesquare\Connect;
use Bluesquare\Connect\Traits\HasConnectSync;
use GuzzleHttp\Client;
use Illuminate\Http\Request;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Psr\Http\Message\StreamInterface;
@ -359,4 +360,9 @@ class Connect
{
return config('bconnect.url') ?? 'https://connect.bluesquare.io';
}
public function routes(Router $router)
{
dump($router);
}
}

19
src/Facades/Connect.php

@ -0,0 +1,19 @@
<?php
namespace Bluesquare\Connect\Facades;
use Illuminate\Support\Facades\Facade;
class Connect extends Facade
{
/**
* Register the typical Connect routes for an application.
* @return void
*/
public static function routes()
{
static::$app->make(\Bluesquare\Connect\Connect::class)->routes(
static::$app->make('router')
);
}
}
Loading…
Cancel
Save