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
SELECT CONCAT("ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ", | |
"ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ") | |
AS alter_sql | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = 'mist'; |
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 | |
/** | |
* Trait Guarded | |
* use in a Laravel FormRequest class | |
*/ | |
trait Guarded | |
{ | |
/** | |
* Get all input parameter that are guarded by and | |
* match the rules array of the form 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
import { Injectable } from '@angular/core'; | |
import { Http, Headers, RequestOptions, Response } from '@angular/http'; | |
import { User } from '../_models/index'; | |
@Injectable() | |
export class UserService { | |
constructor(private http: Http) { } | |
getAll() { |
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\Console\Commands; | |
use Illuminate\Routing\Route; | |
use Illuminate\Foundation\Console\RouteListCommand; | |
class RouteRBAC extends RouteListCommand | |
{ | |
/** | |
* {@inheritdoc} |
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\Console\Commands; | |
use Illuminate\Routing\Route; | |
use Illuminate\Foundation\Console\RouteListCommand; | |
class RouteTable extends RouteListCommand | |
{ | |
/** | |
* {@inheritdoc} |
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
// Based on Laravel's base setup. This is the directory structure until the component | |
// later on, below this files, I'll show the contents of app.js and store.js | |
[assets] | |
|-- [sass] | |
|-- [js] | |
|-- app.js | |
|-- store.js | |
|-- setup.js | |
|-- [components] |
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
require('./setup'); | |
import {store} from './store'; | |
/* | |
Root components: | |
all root components below are merely dummies | |
*/ | |
// Sitebuilder root component |
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
// in your webpack config | |
const variables = path.resolve(__dirname, './your/directory/variables.scss') | |
resolve: { | |
alias: { | |
variables | |
} | |
} | |
// in *.vue: |
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
const elementIsFound = (element) => {return document.body.contains(document.getElementById(element))}; | |
Vue.prototype.$mountIf = (el, hydrating) => { | |
if(elementIsFound(el)) { | |
el = el && inBrowser ? query(el) : undefined; | |
return mountComponent(this, el, hydrating) | |
} | |
}; |
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
const elementIsFound = (element) => {return document.body.contains(document.getElementById(element))}; | |
Vue.prototype.$mountIf = (el, hydrating) => { | |
if(elementIsFound(el)) { | |
el = el && inBrowser ? query(el) : undefined; | |
return mountComponent(this, el, hydrating) | |
} | |
}; |