Last active
April 18, 2016 05:02
-
-
Save vocolboy/3aa1a63465d559fcf0c1018c7638e2c7 to your computer and use it in GitHub Desktop.
This file contains 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
class MeetController extends Controller | |
{ | |
public function store() | |
{ | |
$v = Validator::make(request()->all(), Meets::rules()); | |
if($v->fails()) { | |
#return error | |
} | |
#continue | |
} | |
} | |
------------- | |
class Meets | |
{ | |
public static function rules() | |
{ | |
return [ | |
'date_type' => 'required|numeric|in:1,2,3', | |
'meal_times' => (request('date_type') == 1) ? 'required|numeric|in:1,2,3,4,5' : '', | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Mombuyish thx