Skip to content

Instantly share code, notes, and snippets.

View zorca's full-sized avatar
✴️
Working from a faraway star

Zorca Orcinus zorca

✴️
Working from a faraway star
  • Lithuania
View GitHub Profile
@zorca
zorca / vue-tailwind.js
Last active December 8, 2020 15:24
vue-tailwind.js
import Vue from 'vue'
import VueTailwind from 'vue-tailwind'
import settings from '../themes/contra/vue-tailwind.js'
Vue.use(VueTailwind, settings)
const 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
mutation CreateOrderMutation {
createOrder(input: {
clientMutationId: "orderMutation",
lineItems: [
{productId: 43, quantity: 2},
{productId: 44, quantity: 3},
]}) {
order {
id
}
'use strict';
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/
module.exports = {
likeOne: async (ctx, next) => {
let user = ctx.state.user;
query MenusQuery {
menus {
nodes {
name
menuItems {
nodes {
label
path
cssClasses
menu_item_options {
mutation LoginUser ($clientMutationId:String!,$username:String!, $password:String!) {
login( input: {
clientMutationId: $clientMutationId,
username: $username,
password: $password
} ) {
authToken
user {
id
name
'use strict';
/**
* Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers)
* to customize this controller
*/
module.exports = {
likeOne: async (ctx, next) => {
let user = ctx.state.user;
<template>
<div class="player-container video-responsive">
<vue-plyr class="plyr-outer plyr-outer--custom">
<div class="plyr__video-embed">
<iframe
src="https://www.youtube.com/embed/ennSXaDOOeA?iv_load_policy=3&modestbranding=1&playsinline=1&showinfo=0&rel=0&enablejsapi=1"
allowfullscreen
allowtransparency
>
</iframe>
@zorca
zorca / apistore.js
Created September 10, 2020 06:07 — forked from galvez/apistore.js
// APIStoreProps are properties that need to be
// ignored when running APIStore.makeStore()
const APIStoreProps = ['use', 'classes', 'constructor', 'init', 'state']
// getMethods returns methods defined
// in a given class' prototype, except init and constructor
const getMethods = (cls) => {
return Object.getOwnPropertyNames(cls.prototype)
.reduce((obj, prop) => {
Route::middleware([
'tenant-api',
InitializeTenancyByRequestData::class,
PreventAccessFromCentralDomains::class,
])->group(function () {
Route::get('tenants/current', 'TenantController@show');
Route::post('users/token', 'UserController@token');
Route::middleware(['auth:sanctum'])->group(function () {
Route::get('users/current', 'UserController@show');
});