Skip to content

Instantly share code, notes, and snippets.

View lrlopez's full-sized avatar

Luis Ramón López lrlopez

View GitHub Profile
@lrlopez
lrlopez / ProductCategory.php
Created May 30, 2017 21:43 — forked from treetop1500/ProductCategory.php
Sortable Drag and Drop Entities with Symfony and HTML5
<?php
namespace Common\ContentBundle\Entity;
...
use Gedmo\Mapping\Annotation as Gedmo;
class ProductCategory
{
...
/**
* @var integer $position
@lrlopez
lrlopez / gist:3552220
Created August 31, 2012 12:36
AngularJS JSON Post example
var loginService = $resource('whateverURL/v1/auth');
var action = new loginService({
'username': $scope.user,
'password': $scope.pass,
'organization_id': $scope.organization.id
}); // These will be included in each POST request
var urlData = { 'token': 459 }; // This will be included into the URL as parameters
var bodyData = { 'Example': 56 }; // This will be included in the body but just for the following request