feat: implement database management service layer and frontend SQL import/export utility
This commit is contained in:
@@ -112,8 +112,11 @@ class SchemaController extends Controller
|
||||
$this->initializeDriver($request);
|
||||
$config = $request->only(['host', 'username', 'password', 'database', 'port', 'table']);
|
||||
$filters = json_decode($request->get('filters', '[]'), true);
|
||||
$options = [
|
||||
'structureOnly' => filter_var($request->get('structureOnly'), FILTER_VALIDATE_BOOLEAN)
|
||||
];
|
||||
|
||||
$filePath = $this->databaseService->export($config, $filters);
|
||||
$filePath = $this->databaseService->export($config, $filters, $options);
|
||||
|
||||
return Response::download($filePath)->deleteFileAfterSend(true);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user