Skip to content

Instantly share code, notes, and snippets.

@achmadfatoni
Created September 8, 2016 03:36
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achmadfatoni/5cb71a93bb7dddcbf3b06de6fa4c0edf to your computer and use it in GitHub Desktop.
Save achmadfatoni/5cb71a93bb7dddcbf3b06de6fa4c0edf to your computer and use it in GitHub Desktop.
Laravel slug validation
Validator::extend('slug', function($attribute, $value, $parameters, $validator) {
return preg_match('/^[a-z0-9]+(?:-[a-z0-9]+)*$/', $value);
});
@avmek
Copy link

avmek commented Jun 28, 2021

başlık

@avmek
Copy link

avmek commented Jun 28, 2021

deneme test

@avmek
Copy link

avmek commented Jun 28, 2021

deneme test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment