public static function scopes() { return array('frogs' => function ($chain) { return $chain->filter('type = ?', 'frog'); }, 'by_type' => function ($chain, $type) { return $chain->filter('type = ?', $type); }); }