İlk temizlik tamamlandı bir önceki projeden

This commit is contained in:
Ümit Tunç
2026-04-28 21:14:25 +03:00
commit f80443aec0
10000 changed files with 959965 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
use Illuminate\Support\Facades\Schema;
function table_columns($tableName) {
$prefix = 'table_columns_' . $tableName;
if(Cache::has($prefix)) {
$columnNames = Cache::get($prefix);
} else {
$exceptsColumns = ['created_at', 'updated_at'];
$columnNames = array_diff(Schema::getColumnListing($tableName), $exceptsColumns);
Cache::put($prefix, $columnNames);
}
return $columnNames;
}
function table_column_type($tableName, $columnName) {
$prefix = 'table_column_type_' . $tableName . $columnName;
if(Cache::has($prefix)) {
$columnType = Cache::get($prefix);
} else {
$columnType = Schema::getColumnType($tableName, $columnName);
Cache::put($prefix, $columnType);
}
return $columnType;
}
?>