Instantly share code, notes, and snippets.

View laravel-pivot-seeder.php
<?php
use Illuminate\Database\Seeder;
class PostTagTableSeeder extends Seeder
{
/**
* @var
*/
private $pivotData = [];
View ReactJS-Cookie.js
View VueJS-Cookies-message.js
/**
* Cookies Pop Up Component
* A pop up to inform the user that cookies are used on a/this site.
*
* usage:
* <cookie></cookie>
*
* User Overwite the generic message and expiry days,
* add 'cookie-message' and/or 'days-to-expire' properties to the component
* <cookie
View CookiesPopup.js
"use strict";
/**
* CookiesPopup
* a simple class to check for, set, a cookie if not currently set,
* and inform the user that cookies are present
*/
/**
* set up some private vars
*/
View TestService.js
module.exports = function($http, $q, $log) {
return {
getStores : function(){
var deferred = $q.defer();
$http({method: 'GET', url : 'api/stores'})
.success(function(data, status, headers, config) {deferred.resolve(data) })
.error(function(data, status, headers, config) { deferred.reject(status);});
return deferred.promise;
},
View gist:e00946ae1ed64d7ce275
/**
* Simple JS Class Set up and usage
*/
var MyClassName = (function(){
/**
* Add variable here public and private
* I use an underscore for my private variables to separate them visually
*/