/** * Get safe string * * @param $string * @return mixed */ public static function alias($string) { $cleaned = Filter::strip($string); $cleaned = Str::slug($cleaned); return $cleaned; }
public function testApplySeveralRules() { $source = '127.0001 <img> some-<b>WORD</b> ' . "\t"; $excepted = Filter::strip($source); $excepted = Filter::alias($excepted); $excepted = Filter::int($excepted); isSame($excepted, Filter::_($source, 'Strip, alias,int')); }