Created
August 19, 2014 17:07
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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