From ebe056a2fda683ee9e6ec1cf220b8e49dc6498d1 Mon Sep 17 00:00:00 2001 From: Christopher Moore Date: Thu, 30 Jun 2016 13:24:57 -0700 Subject: [PATCH] allow user to define route --- config/config.php | 1 + src/Support/Http/routes.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index 5c3c814620..448b492f04 100644 --- a/config/config.php +++ b/config/config.php @@ -21,6 +21,7 @@ 'cache' => storage_path('lighthouse/cache'), 'controller' => 'Nuwave\Lighthouse\Support\Http\Controllers\LaravelController@query', 'pagination_macro' => 'paginate', + 'route' => [], // 'model_path' => 'App\\Models', // 'camel_case' => false, diff --git a/src/Support/Http/routes.php b/src/Support/Http/routes.php index 552b47846b..74c7a9c47f 100644 --- a/src/Support/Http/routes.php +++ b/src/Support/Http/routes.php @@ -1,5 +1,8 @@ 'graphql', 'uses' => $controller]); +Route::group($route, function () use ($controller) { + Route::post('graphql', ['as' => 'graphql', 'uses' => $controller]); +});