Browse Source

Routing

tags/1.0
Maxime Renou 2 years ago
parent
commit
3895fbdb26
  1. 11
      src/Connect.php
  2. 9
      src/Facades/Connect.php

11
src/Connect.php

@ -378,16 +378,17 @@ class Connect
public function routes()
{
Route::middleware('web')
->namespace('\Bluesquare\Connect\Controllers')
Route::namespace('\Bluesquare\Connect\Controllers')
->group(function () {
Route::get('connect/authorize', 'ConnectController@authorize');
Route::get('connect/callback', 'ConnectController@callback');
});
}
Route::prefix('api')
->middleware('api')
->namespace('\Bluesquare\Connect\Controllers')
public function apiRoutes()
{
Route::namespace('\Bluesquare\Connect\Controllers')
->prefix('api')
->group(function () {
Route::post('connect/webhook', 'ConnectController@webhook');
});

9
src/Facades/Connect.php

@ -14,4 +14,13 @@ class Connect extends Facade
{
static::$app->make(\Bluesquare\Connect\Connect::class)->routes();
}
/**
* Register the typical Connect API routes for an application.
* @return void
*/
public static function apiRoutes()
{
static::$app->make(\Bluesquare\Connect\Connect::class)->apiRoutes();
}
}

Loading…
Cancel
Save