Fakultas Ilmu Komputer UI

Commit b825f45b authored by Usman Sidiq's avatar Usman Sidiq
Browse files

Merge branch 'sidiq/database' into 'master'

Delete database

See merge request !3
parents 35e9c95c 899147fb
......@@ -120,11 +120,14 @@ class AdminerDatabaseController extends Controller
/**
* Remove the specified resource from storage.
*
* @param \App\Models\AdminerDatabase $adminerDatabase
* @param $id
* @return \Illuminate\Http\Response
*/
public function destroy(AdminerDatabase $adminerDatabase)
public function destroy($id)
{
//
$database = AdminerDatabase::find($id);
$database->delete();
// @TODO delete db sql
}
}
This diff is collapsed.
......@@ -32925,8 +32925,8 @@ __webpack_require__.r(__webpack_exports__);
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(/*! /home/aabccd021/Projects/open-sauce/admin/resources/js/app.js */"./resources/js/app.js");
module.exports = __webpack_require__(/*! /home/aabccd021/Projects/open-sauce/admin/resources/sass/app.scss */"./resources/sass/app.scss");
__webpack_require__(/*! D:\Kuliah\OSSD\open-sauce\admin\resources\js\app.js */"./resources/js/app.js");
module.exports = __webpack_require__(/*! D:\Kuliah\OSSD\open-sauce\admin\resources\sass\app.scss */"./resources/sass/app.scss");
 
 
/***/ })
......
......@@ -33,6 +33,7 @@
<tr>
<th>Database Name</th>
<th>Username Mahasiswa</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
......@@ -42,6 +43,9 @@
>
<td>{{ database.name }}</td>
<td>{{ database.user.user_id }}</td>
<td>
<button class="btn btn-danger btn-sm" @click="deleteData(database.id)">Delete</button>
</td>
</tr>
</tbody>
</table>
......@@ -84,6 +88,13 @@ export default {
db_name: this.db_name
})
.then(res => this.loadData());
},
deleteData(id) {
console.log(id);
axios.delete(this.admins_uri + '/' + id)
.then(res=> this.loadData());
let index = this.adminer_databases.indexOf(this.db_name);
this.adminer_databases.splice(index, 1);
}
},
mounted() {
......
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "916a4c5c6dde1f0677e54e2bc7cbe060",
"packages": [],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.0.0"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment