Unused use removed
This commit is contained in:
parent
064e8a8054
commit
e6ceea1b1b
@ -1,24 +0,0 @@
|
|||||||
<?php namespace GermanAirlinesVa\Graphql;
|
|
||||||
|
|
||||||
use Closure;
|
|
||||||
|
|
||||||
class Authentication
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Handle an incoming request.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param \Closure $next
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function handle($request, Closure $next)
|
|
||||||
{
|
|
||||||
if ($request->input('gql_session') === 'SUPER_SECRET_TOKEN') {
|
|
||||||
return 'false';
|
|
||||||
} else {
|
|
||||||
return 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -5,6 +5,7 @@ use System\Classes\PluginBase;
|
|||||||
use App;
|
use App;
|
||||||
use Config;
|
use Config;
|
||||||
use Illuminate\Database\DatabaseManager;
|
use Illuminate\Database\DatabaseManager;
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
use Illuminate\Foundation\AliasLoader;
|
use Illuminate\Foundation\AliasLoader;
|
||||||
use GermanAirlinesVa\Graphql\Classes\GraphqlServiceProvider;
|
use GermanAirlinesVa\Graphql\Classes\GraphqlServiceProvider;
|
||||||
use Nuwave\Lighthouse\Subscriptions\SubscriptionServiceProvider;
|
use Nuwave\Lighthouse\Subscriptions\SubscriptionServiceProvider;
|
||||||
@ -43,7 +44,7 @@ class Plugin extends PluginBase
|
|||||||
$this->app->singleton(DatabaseManager::class, function ($app) {
|
$this->app->singleton(DatabaseManager::class, function ($app) {
|
||||||
return $app->make('db');
|
return $app->make('db');
|
||||||
});
|
});
|
||||||
\Illuminate\Support\Facades\Broadcast::routes([
|
Broadcast::routes([
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'middleware' => 'GermanAirlinesVA\\Graphql\\Classes\\Authentication',
|
'middleware' => 'GermanAirlinesVA\\Graphql\\Classes\\Authentication',
|
||||||
]);
|
]);
|
||||||
|
|||||||
Binary file not shown.
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Broadcast;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Broadcast Channels
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may register all of the event broadcasting channels that your
|
|
||||||
| application supports. The given channel authorization callbacks are
|
|
||||||
| used to check if an authenticated user can listen to the channel.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
Broadcast::channel('lighthouse-*', function ($user) {
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
@ -1,7 +1,6 @@
|
|||||||
<?php namespace GermanAirlinesVa\Graphql\Controllers;
|
<?php namespace GermanAirlinesVa\Graphql\Controllers;
|
||||||
|
|
||||||
use Backend\Classes\Controller;
|
use Backend\Classes\Controller;
|
||||||
use BackendMenu;
|
|
||||||
|
|
||||||
class GraphqlKey extends Controller
|
class GraphqlKey extends Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<?php namespace GermanAirlinesVa\Graphql\Controllers;
|
<?php namespace GermanAirlinesVa\Graphql\Controllers;
|
||||||
|
|
||||||
use Backend\Classes\Controller;
|
use Backend\Classes\Controller;
|
||||||
use BackendMenu;
|
|
||||||
|
|
||||||
class Playground extends Controller
|
class Playground extends Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\Graphql\Models;
|
<?php namespace GermanAirlinesVa\Graphql\Models;
|
||||||
|
|
||||||
use Cms\Classes\Theme;
|
|
||||||
use Model;
|
use Model;
|
||||||
|
|
||||||
class GraphqlKey extends Model
|
class GraphqlKey extends Model
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\Graphql\Models;
|
<?php namespace GermanAirlinesVa\Graphql\Models;
|
||||||
|
|
||||||
use Cms\Classes\Theme;
|
|
||||||
use Model;
|
use Model;
|
||||||
|
|
||||||
class Settings extends Model
|
class Settings extends Model
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\GraphQl\Updates;
|
<?php namespace GermanAirlinesVa\GraphQl\Updates;
|
||||||
|
|
||||||
use Config;
|
|
||||||
use Schema;
|
use Schema;
|
||||||
use October\Rain\Database\Updates\Migration;
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user