I have a registration form and i added 3 select input for date of birth user.
Here the HTML code.
In my RegisterController.php I've added following rules for validation.
'day' => 'required|in:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31',
'month' => 'required|in:1,2,3,4,5,6,7,8,9,10,11,12',
'year' => 'required|in:2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992',
Again in my RegisterController.php for user creation i added field for store the date in my database
'dob' => $data['day' . 'month' . 'year']
In the User Model I've added in protected fillable my field but this don't work.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire