This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class AddAuthHeader | |
{ | |
/** | |
* Handle an incoming request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
class Kernel extends HttpKernel | |
{ | |
/** | |
* The application's global HTTP middleware stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Gate; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
use Laravel\Passport\Passport; | |
use Laravel\Passport\Console\InstallCommand; | |
class AuthServiceProvider extends ServiceProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Http\Resources\Json\Resource; | |
use Laravel\Passport\Passport; | |
use Laravel\Passport\Client; | |
class AppServiceProvider extends ServiceProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"A datetime string with format 'Y-m-d H:i:s', e.g. '2018-01-01 13:00:00'." | |
scalar DateTime @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\DateTime") | |
"A date string with format 'Y-m-d', e.g. '2011-05-23'." | |
scalar Date @scalar(class: "Nuwave\\Lighthouse\\Schema\\Types\\Scalars\\Date") | |
type Query { | |
users: [User!]! @all(model: "App\\User") | |
user(id: ID @eq): User @find(model: "App\\User") | |
tickets: [Ticket!]! @all(model: "App\\Ticket") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloClient } from 'apollo-client' | |
import { HttpLink } from 'apollo-link-http' | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import VueApollo from 'vue-apollo' | |
import { vm } from '@/app.js' | |
let token = document.head.querySelector('meta[name="csrf-token"]') | |
const httpLink = new HttpLink({ | |
headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<v-toolbar flat color="white"> | |
<v-toolbar-title>Tickets</v-toolbar-title> | |
<v-divider | |
class="mx-2" | |
inset | |
vertical> | |
</v-divider> | |
<v-spacer></v-spacer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Fragments | |
fragment TicketsFields on Ticket { | |
id | |
title | |
issue | |
status | |
contact | |
} | |
#Queries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mix = require('laravel-mix') | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps | |
| for your Laravel application. By default, we are compiling the Sass | |
| file for the application as well as bundling up all the JS files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueApollo from 'vue-apollo' | |
import apolloProvider from '@/config/apollo.js' | |
Vue.use(VueApollo) | |
export const vm = new Vue({ | |
el: '#app', | |
render: h => h(App), | |
apolloProvider, |