Error inserting array of objects

0

I get an array and I have to scan and insert it into my database.

Array example I'm going to receive on the request:

How to set in my controller to scan and insert into the bank:

     public function store(AcademicoRequest $request){
    $res= $request->all();
    foreach($res as $value) {
        Academico::create($value);
    }
    return response()->json($res);
}

When trying to insert, the same fails.

    
asked by anonymous 12.04.2018 / 01:34

0 answers