Tengo esto ya echo pero me falta mas y no tengo idea
Código PHP:
Ver originalfunction backup_tables($tables = '*') {
$array_tables = [];
$return="";
$tables = $capsule::select('SHOW TABLES');
foreach ($tables as $key => $val) {
$tableName = (array)$val; }
foreach($array_tables as $table){
$result = $capsule->table($table)->get();
$num_fields = count($result); $return.= '--';
$return.="\n";
$return.= '-- Estructura de tabla para la tabla `'.$table.'`';
$return.="\n";
$return.= '--';
$return.="\n";
$return.= 'DROP TABLE '.$table.';';
$return.= "\nCREATE TABLE ".$table.";\n\n";
for ($i = 0; $i < $num_fields; $i++) {
foreach($result[$i] as $row){
{ $return2.= '"'.$row.'"' ;
} else {
$return2.= '"not"';
}
}
}
$return.="\n\n";
}
//save file
}