PHP code example of xkojimedia / laravel-altair-graphql

1. Go to this page and download the library: Download xkojimedia/laravel-altair-graphql library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xkojimedia / laravel-altair-graphql example snippets


'providers' => [
    // Other providers...
    XKojiMedia\AltairGraphQL\AltairGraphQLServiceProvider::class,
]

$app->register(XKojiMedia\AltairGraphQL\AltairGraphQLServiceProvider::class);

$app->configure('altair-graphql');

<script>
  var altairOptions = {
    endpointURL: "{{url(config('altair-graphql.endpoint'))}}"
  };

  window.addEventListener("load", function() {
    AltairGraphQL.init(altairOptions);
  });
</script>

<script>window.__CSRF_TOKEN__ = "{{ csrf_token() }}";</script>