Creating the Project

Create the Laravel Project

Alright, so first things first, we need to create a new Laravel project. If you haven't done so already, follow these instructions to install the Laravel installer globally and then run the following command.

$ laravel new todo-graphql

Setup Lighthouse

Inside the root of our new project, let's include the Lighthouse package via composer.

$ composer require nuwave/lighthouse

Now let's add the service provider and facade in our app/config.php file

[
    // ...
    'providers' => [
        // ...
        Nuwave\Lighthouse\LaravelServiceProvider::class,
    ],
    'aliases' => [
        // ...
        'GraphQL' => Nuwave\Lighthouse\Support\Facades\GraphQLFacade::class,
    ]
]

Okay, all we need to finish the initial set up is to publish the lighthouse package

$ php artisan vendor:publish --provider="Nuwave\Lighthouse\LaravelServiceProvider"

results matching ""

    No results matching ""