mercredi 2 octobre 2019

I want to save subject id's against i class id in laravel

enter image description here

i tried this code. i need correct code please guide me.

   `$request->validate([
   'class'=> required,
   'subject'=>required,
    ]);
    $class=DB::table('class')->get();

    @for ($i = 0; $i <$subject; $i++)

         $class->class = $request->get('class');
         $subject->subject = $request->get('subject');

    @endfor
    return redirect()->(classsetup.getData)
    ->with('success','Subject are saved against class');`


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire