diff --git a/src/BeautyEloquent.php b/src/BeautyEloquent.php index b105b47..e3a4275 100644 --- a/src/BeautyEloquent.php +++ b/src/BeautyEloquent.php @@ -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]; @@ -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 = []; @@ -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 = []; @@ -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 = [];