Support the ongoing development of Laravel.io →
Requests Eloquent
Last updated 2 years 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!

Eventy

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?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.