lundi 11 juin 2018

How to select data from multiple dropdown and combined them into one variable in laravel?

I have three dropdowns for Day, Month, and year for Date of Birth Data and one column dob in the database. I want to convert selected data into the date of birth format then stored in the database. this is creating syntax error.

my controller code :

protected function create(array $data)
{ 
        'month'  => $data['month'],
        'day'  => $data['day'],
        'year'  => $data['year'],

     return User::create([
        'first_name' => $data['first_name'],
        'last_name' => $data['last_name'],
        'gender'    =>$data['gender'],
        'email' => $data['email'],
        'password' => bcrypt($data['password']),
        'phone' => $data['phone'],
        'dob'   => "month/day/year",
    ]);
}



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JyoPyz
via IFTTT

Aucun commentaire:

Enregistrer un commentaire