コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public static function displaySettingsIndex()
 {
     $settingGroup = Request::input('settingGroup');
     if ($settingGroup == null) {
         $settingGroup = 'general_msd';
     }
     $settingGroups = SettingController::getSettingGroups();
     $fetchSettings = SettingController::fetchSettings($settingGroup);
     $params = array('settingGroups' => $settingGroups, 'chosenGroup' => $settingGroup, 'settings' => $fetchSettings);
     return ViewController::show('settings.index', 'MySQLDumper Settings', $params, 'settings');
 }
コード例 #2
0
ファイル: ViewController.php プロジェクト: xijbx/mysqldumper
 /**
  * Renders the sidebar.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 private static function renderSidebar($activeTab)
 {
     $sql = "SHOW DATABASES";
     $dbList = DB::select($sql);
     $authUser = \Auth::user();
     $conduit = SettingController::fetchSetting('msd_mode')->value;
     $template = view('sidebar', ['dbList' => $dbList, 'conduit' => $conduit, 'activeTab' => $activeTab, 'authUser' => $authUser]);
     return $template;
 }
コード例 #3
0
ファイル: routes.php プロジェクト: xijbx/mysqldumper
     });
     // conduit execute
     Route::post('execute/{id}', function ($id) {
         return APIController::conduitExecute($id);
     });
     // conduit update
     Route::get('update/{id}', function ($id) {
         return APIController::conduitUpdate($id);
     });
 });
 // settings
 Route::get('/settings', function () {
     return SettingController::displaySettingsIndex();
 });
 Route::post('/settings', function () {
     return SettingController::displaySettingsIndex();
 });
 // DATABASE FUNCTIONS
 // database management
 Route::get('/manage-db/{dbName}', function ($dbName) {
     return DBController::fetchTablesForDatabase($dbName);
 });
 Route::get('/drop-database/{dbName}', function ($dbName) {
     return DBController::dropDatabase($dbName);
 });
 // table management
 Route::group(['prefix' => 'view-table'], function () {
     Route::get('{dbName}/{tableName}', function ($dbName, $tableName) {
         return DBController::viewTable($dbName, $tableName);
     });
 });