Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
/** | |
* An AngularJS directive for Dropzone.js, http://www.dropzonejs.com/ | |
* | |
* Usage: | |
* | |
* <div ng-app="app" ng-controller="SomeCtrl"> | |
* <button dropzone="dropzoneConfig"> | |
* Drag and drop files here or click to upload | |
* </button> | |
* </div> |
// ---- | |
// Sass (v3.4.13) | |
// Compass (v1.0.3) | |
// ---- | |
.form { | |
color: black; | |
&__label { font-weight: bold; } | |
&__input { |
// ---- | |
// Sass (v3.4.13) | |
// Compass (v1.0.3) | |
// ---- | |
.form { | |
color: black; | |
&__label { font-weight: bold; } | |
&__input { |
/* | |
jquery.draghover.js | |
Emulates draghover event by tracking | |
dragenter / dragleave events of element + children. | |
https://gist.github.com/gists/3794126 | |
http://stackoverflow.com/a/10310815/4196 |
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2013 Thom Seddon | |
* Copyright (c) 2010 Google | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
$ git config --global core.excludesfile ~/.gitignore | |
$ echo .DS_Store >> ~/.gitignore |
[ | |
"United States" => "us", | |
"Afghanistan" => "af", | |
"Albania" => "al", | |
"Algeria" => "dz", | |
"American Samoa" => "as", | |
"Andorra" => "ad", | |
"Angola" => "ad", | |
"Anguilla" => "ai", | |
"Antarctica" => "aq", |
angular.module('saveBeforeExitExample', []) | |
.directive("saveBeforeExit", ["notificationService", function(notificationService) { | |
"use strict"; | |
return { | |
link: function(scope, element, attrs) { | |
window.onbeforeunload = function(){ | |
if (element.hasClass("ng-dirty")) { | |
element.submit(); | |
} |