Skip to content

Commit

Permalink
fix method create
Browse files Browse the repository at this point in the history
  • Loading branch information
aacassandra committed Nov 12, 2020
1 parent 6289678 commit 811c257
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/BeautyEloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ public static function Create($table, $data = [])
}

$request = new $table;
foreach ($data as $value) {
$columnName = $value[0];
$request->$columnName = $value[1];
foreach ($data as $key => $value) {
$request->$key = $value;
}
$request->save();
$template = BeautyEloquentTools::ResponseTemplate();
Expand Down

0 comments on commit 811c257

Please sign in to comment.