Support the ongoing development of Laravel.io →
Requests Eloquent
Last updated 6 months ago.
0

If your customizedExercises input is an array, it is that you need to loop thru eg,

Route::post('/api/customized-exercises',function() {
    $created = [];
    foreach(Request->customizedExercises as $exercise) {
        $created[] = App\CustomizedExercise::create($exercise);
    };

  return $created;
});
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

shigg1120 shigg1120 Joined 16 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.