Skip to content

Instantly share code, notes, and snippets.

@drakakisgeo
Created August 19, 2014 17:07
Show Gist options
  • Save drakakisgeo/bbbfb32a02afe90fe9ab to your computer and use it in GitHub Desktop.
Save drakakisgeo/bbbfb32a02afe90fe9ab to your computer and use it in GitHub Desktop.
Custom filter to validate if ending date is less than starting date (Laravel)
// Validate End
Validator::extend('Validend', function($attribute, $value, $parameters)
{
$start_date = Input::get($parameters[0]);
return (strtotime($value) > strtotime($start_date));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment