Routing
This commit is contained in:
parent
38066dd0cb
commit
3895fbdb26
|
@ -378,16 +378,17 @@ class Connect
|
||||||
|
|
||||||
public function routes()
|
public function routes()
|
||||||
{
|
{
|
||||||
Route::middleware('web')
|
Route::namespace('\Bluesquare\Connect\Controllers')
|
||||||
->namespace('\Bluesquare\Connect\Controllers')
|
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('connect/authorize', 'ConnectController@authorize');
|
Route::get('connect/authorize', 'ConnectController@authorize');
|
||||||
Route::get('connect/callback', 'ConnectController@callback');
|
Route::get('connect/callback', 'ConnectController@callback');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Route::prefix('api')
|
public function apiRoutes()
|
||||||
->middleware('api')
|
{
|
||||||
->namespace('\Bluesquare\Connect\Controllers')
|
Route::namespace('\Bluesquare\Connect\Controllers')
|
||||||
|
->prefix('api')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::post('connect/webhook', 'ConnectController@webhook');
|
Route::post('connect/webhook', 'ConnectController@webhook');
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,4 +14,13 @@ class Connect extends Facade
|
||||||
{
|
{
|
||||||
static::$app->make(\Bluesquare\Connect\Connect::class)->routes();
|
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