Skip to content

Instantly share code, notes, and snippets.

View heroicpixels's full-sized avatar

Dave heroicpixels

View GitHub Profile
@heroicpixels
heroicpixels / gist:8356338
Created January 10, 2014 15:26
Demonstrating how to user Heroicpixels/Filterable with Eloquent joins and eager loading
CREATE TABLE IF NOT EXISTS `cats` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
INSERT INTO `cats` (`id`, `name`) VALUES
(1, 'Category One'),
(2, 'Category Two');
class Filterable {
public $model;
public $options;
public function __construct($model) {
$this->model = $model;
}