From da8d669ba19430f095edc28add74cd9ce0b0e3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 12 Feb 2019 18:12:38 +0100 Subject: [PATCH] Starting adding Laravel related documentation --- docs/laravel-package.md | 52 +++++++++++++++++++++++++++++++++++++++++ website/sidebars.json | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 docs/laravel-package.md diff --git a/docs/laravel-package.md b/docs/laravel-package.md new file mode 100644 index 0000000000..7a89ceac8f --- /dev/null +++ b/docs/laravel-package.md @@ -0,0 +1,52 @@ +--- +id: laravel-package +title: Getting started with Laravel +sidebar_label: Laravel package +--- + +The GraphQLite-Laravel package is compatible with **Laravel 5.x**. + +## Installation + +Open a terminal in your current project directory and run: + +```console +$ composer require thecodingmachine/graphqlite-laravel +``` + +If you want to publish the configuration (in order to edit it), run: + +```console +$ php artisan vendor:publish --provider=TheCodingMachine\GraphQLite\Laravel\Providers\GraphQLiteServiceProvider +``` + +You can then configure the library by editing `config/graphqlite.php`. + +**config/graphqlite.php** +```php + 'App\\Http\\Controllers', + 'types' => 'App\\', + 'debug' => Debug::RETHROW_UNSAFE_EXCEPTIONS +]; +``` + +The debug parameters are detailed in the [documentation of the Webonyx GraphQL library](https://webonyx.github.io/graphql-php/error-handling/) +which is used internally by GraphQLite. diff --git a/website/sidebars.json b/website/sidebars.json index 036944e82a..6383da9243 100755 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -1,7 +1,7 @@ { "docs": { "Introduction": ["features"], - "Installation": ["getting-started", "symfony-bundle", "other-frameworks"], + "Installation": ["getting-started", "symfony-bundle", "laravel-package", "other-frameworks"], "Usage": ["queries", "mutations", "type_mapping", "extend_type", "authentication_authorization", "external_type_declaration", "input-types", "inheritance"], "Advanced": ["file-uploads", "custom-output-types", "troubleshooting"], "Reference": ["annotations_reference"]