implemented validation method in eloquent