Routing
This commit is contained in:
parent
38066dd0cb
commit
3895fbdb26
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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…
Reference in New Issue