Skip to content

Commit

Permalink
fix table name
Browse files Browse the repository at this point in the history
  • Loading branch information
aacassandra committed Mar 9, 2020
1 parent 626b31e commit 95ca524
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/BeautyEloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BeautyEloquent
*/
public function Create($table, $data=[])
{
$table = 'App\\'.$table;
$table = 'App\\'.ucfirst($table);
$request = new $table;
foreach ($data as $key => $value) {
$columnName = $value[0];
Expand All @@ -39,7 +39,7 @@ public function Create($table, $data=[])
*/
public function Read($table='', $options=[])
{
$table = 'App\\'.$table;
$table = 'App\\'.ucfirst($table);
$request = new $table;

$finalWhere = [];
Expand Down Expand Up @@ -132,7 +132,7 @@ public function Read($table='', $options=[])
*/
public function Update($table='', $data=[], $options=[])
{
$table = 'App\\'.$table;
$table = 'App\\'.ucfirst($table);
$request = new $table;

$finalWhere = [];
Expand Down Expand Up @@ -191,7 +191,7 @@ public function Update($table='', $data=[], $options=[])
*/
public function Delete($table='', $options=[])
{
$table = 'App\\'.$table;
$table = 'App\\'.ucfirst($table);
$request = new $table;

$finalWhere = [];
Expand Down

0 comments on commit 95ca524

Please sign in to comment.