I have the following function written in php\Laravel
public static function getModelByTablename($tableName) {
    $model = new ('App\Models\\'.Str::studly(strtolower(Str::singular($tableName))));
    return $model;
}
it works fine on my computer(windows 10) but on the server it doesn't work and give me the following error
syntax error, unexpected '('
 
    