mercredi 28 septembre 2016

laravel-5 with auto generate text field

I have a form on my laravel-5 with auto generate text field. Now it has four input fields in a row.With auto generate + button, I can add multiple rows as I want.How can I possibly get this input fields and save to database correctly wherein only the subjects were saved.How about the grades? I don’t have any idea on how to do it.

Sample input:

Subject (1st qtr) (2nd qtr) (3rd qtr ).

Math 85 82 86

English 80 85 86

Science 83 85 87

Here is the Output:

Subject (1st qtr) (2nd qtr) (3rd qtr ) //database columns

Math
English
Science

Here is the code that I’d created:

$Subject= Input::get(‘Subject’);
    foreach ( $Subject as  $Subjects) {
        $member = new test
        $member-> Subject = $Subject;
        $member->save();
    }



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

Aucun commentaire:

Enregistrer un commentaire