Fakultas Ilmu Komputer UI

Commit 2ecf84fb authored by aabccd021's avatar aabccd021
Browse files

add mahasiswa component

parent 5a37c9cf
......@@ -17,9 +17,9 @@ class AdminController extends Controller
* @return void
*/
public function __construct(
UserService $userService,
UserService $userService,
AdminerDatabaseService $adminerDatabaseService
){
) {
$this->middleware('auth');
$this->userService = $userService;
$this->adminerDatabaseService = $adminerDatabaseService;
......@@ -64,6 +64,19 @@ class AdminController extends Controller
));
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function mahasiswas()
{
$header_title = 'Mahasiswas';
return view('admin.mahasiswas', compact(
'header_title',
));
}
/**
* Show the application dashboard.
*
......
<?php
namespace App\Http\Controllers;
use App\Models\Mahasiswa;
use Illuminate\Http\Request;
class MahasiswaController extends Controller
{
public function __construct()
{
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$mahasiswas = Mahasiswa::all();
return response()->json($mahasiswas);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param \App\Models\Mahasiswa $mahasiswa
* @return \Illuminate\Http\Response
*/
public function show(Mahasiswa $mahasiswa)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Mahasiswa $mahasiswa
* @return \Illuminate\Http\Response
*/
public function edit(Mahasiswa $mahasiswa)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Mahasiswa $mahasiswa
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Mahasiswa $mahasiswa)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Mahasiswa $mahasiswa
* @return \Illuminate\Http\Response
*/
public function destroy(Mahasiswa $mahasiswa)
{
//
}
}
......@@ -14,5 +14,5 @@ class Mahasiswa extends Model
protected $fillabel = [
'user_id',
'password'
]
}
\ No newline at end of file
];
}
......@@ -2068,6 +2068,79 @@ __webpack_require__.r(__webpack_exports__);
 
/***/ }),
 
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/admin/MahasiswaComponent.vue?vue&type=script&lang=js&":
/*!***********************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/admin/MahasiswaComponent.vue?vue&type=script&lang=js& ***!
\***********************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
data: function data() {
return {
mahasiswas: [],
mahasiswas_uri: "/admin/resource/mahasiswas"
};
},
methods: {
loadData: function loadData() {
var _this = this;
axios.get(this.mahasiswas_uri).then(function (response) {
$.when(_this.putAsyncData(response.data)).then(function () {
$("#datatable").DataTable();
});
});
},
putAsyncData: function putAsyncData(data) {
this.mahasiswas = data;
}
},
mounted: function mounted() {
this.loadData();
}
});
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/admin/UsersComponent.vue?vue&type=script&lang=js&":
/*!*******************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/admin/UsersComponent.vue?vue&type=script&lang=js& ***!
......@@ -19968,6 +20041,82 @@ render._withStripped = true
 
 
 
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/admin/MahasiswaComponent.vue?vue&type=template&id=a4409064&":
/*!***************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/admin/MahasiswaComponent.vue?vue&type=template&id=a4409064& ***!
\***************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("div", { staticClass: "container-fluid" }, [
_c("div", { staticClass: "row" }, [
_c("div", { staticClass: "col-12" }, [
_c("div", { staticClass: "card m-b-20" }, [
_c("div", { staticClass: "card-body" }, [
_c(
"table",
{
staticClass: "table table-bordered dt-responsive nowrap",
attrs: { id: "datatable", cellspacing: "0", width: "100%" }
},
[
_vm._m(0),
_vm._v(" "),
_c(
"tbody",
_vm._l(_vm.admins, function(admin) {
return _c("tr", { key: admin.id }, [
_c("td", [_vm._v(_vm._s(admin.id))]),
_vm._v(" "),
_c("td", [_vm._v(_vm._s(admin.user_id))]),
_vm._v(" "),
_c("td", [_vm._v(_vm._s(admin.password))]),
_vm._v(" "),
_c("td", [_vm._v("Love you")])
])
}),
0
)
]
)
])
])
])
])
])
}
var staticRenderFns = [
function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c("thead", [
_c("tr", [
_c("th", [_vm._v("ID")]),
_vm._v(" "),
_c("th", [_vm._v("Username")]),
_vm._v(" "),
_c("th", [_vm._v("Password")]),
_vm._v(" "),
_c("th", [_vm._v("Actions")])
])
])
}
]
render._withStripped = true
/***/ }),
 
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/admin/UsersComponent.vue?vue&type=template&id=896b7600&":
......@@ -32240,6 +32389,7 @@ window.Vue = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.common.
Vue.component('example-component', __webpack_require__(/*! ./components/ExampleComponent.vue */ "./resources/js/components/ExampleComponent.vue")["default"]);
Vue.component('admins-component', __webpack_require__(/*! ./components/admin/AdminsComponent.vue */ "./resources/js/components/admin/AdminsComponent.vue")["default"]);
Vue.component('users-component', __webpack_require__(/*! ./components/admin/UsersComponent.vue */ "./resources/js/components/admin/UsersComponent.vue")["default"]);
Vue.component('mahasiswas-component', __webpack_require__(/*! ./components/admin/MahasiswaComponent.vue */ "./resources/js/components/admin/MahasiswaComponent.vue")["default"]);
Vue.component('adminer-databases-component', __webpack_require__(/*! ./components/admin/AdminerDatabasesComponent.vue */ "./resources/js/components/admin/AdminerDatabasesComponent.vue")["default"]);
/**
* Next, we will create a fresh Vue application instance and attach it to
......@@ -32501,6 +32651,75 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
/***/ }),
/***/ "./resources/js/components/admin/MahasiswaComponent.vue":
/*!**************************************************************!*\
!*** ./resources/js/components/admin/MahasiswaComponent.vue ***!
\**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _MahasiswaComponent_vue_vue_type_template_id_a4409064___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MahasiswaComponent.vue?vue&type=template&id=a4409064& */ "./resources/js/components/admin/MahasiswaComponent.vue?vue&type=template&id=a4409064&");
/* harmony import */ var _MahasiswaComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MahasiswaComponent.vue?vue&type=script&lang=js& */ "./resources/js/components/admin/MahasiswaComponent.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
/* normalize component */
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_MahasiswaComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_MahasiswaComponent_vue_vue_type_template_id_a4409064___WEBPACK_IMPORTED_MODULE_0__["render"],
_MahasiswaComponent_vue_vue_type_template_id_a4409064___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "resources/js/components/admin/MahasiswaComponent.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ "./resources/js/components/admin/MahasiswaComponent.vue?vue&type=script&lang=js&":
/*!***************************************************************************************!*\
!*** ./resources/js/components/admin/MahasiswaComponent.vue?vue&type=script&lang=js& ***!
\***************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_MahasiswaComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib??ref--4-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./MahasiswaComponent.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/admin/MahasiswaComponent.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_MahasiswaComponent_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./resources/js/components/admin/MahasiswaComponent.vue?vue&type=template&id=a4409064&":
/*!*********************************************************************************************!*\
!*** ./resources/js/components/admin/MahasiswaComponent.vue?vue&type=template&id=a4409064& ***!
\*********************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MahasiswaComponent_vue_vue_type_template_id_a4409064___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib??vue-loader-options!./MahasiswaComponent.vue?vue&type=template&id=a4409064& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/admin/MahasiswaComponent.vue?vue&type=template&id=a4409064&");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MahasiswaComponent_vue_vue_type_template_id_a4409064___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MahasiswaComponent_vue_vue_type_template_id_a4409064___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/***/ }),
 
/***/ "./resources/js/components/admin/UsersComponent.vue":
......@@ -32590,8 +32809,8 @@ __webpack_require__.r(__webpack_exports__);
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(/*! F:\Muhamad Fariz Farhan\Pelajaran\Term 7\OSSD\open-sauce\admin\resources\js\app.js */"./resources/js/app.js");
module.exports = __webpack_require__(/*! F:\Muhamad Fariz Farhan\Pelajaran\Term 7\OSSD\open-sauce\admin\resources\sass\app.scss */"./resources/sass/app.scss");
__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");
 
 
/***/ })
......
......@@ -22,6 +22,7 @@ window.Vue = require('vue');
Vue.component('example-component', require('./components/ExampleComponent.vue').default);
Vue.component('admins-component', require('./components/admin/AdminsComponent.vue').default);
Vue.component('users-component', require('./components/admin/UsersComponent.vue').default);
Vue.component('mahasiswas-component', require('./components/admin/MahasiswaComponent.vue').default);
Vue.component('adminer-databases-component', require('./components/admin/AdminerDatabasesComponent.vue').default);
/**
......
<template>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card m-b-20">
<div class="card-body">
<table
id="datatable"
class="table table-bordered dt-responsive nowrap"
cellspacing="0"
width="100%"
>
<thead>
<tr>
<th>ID</th>
<th>Username</th>
<th>Password</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr v-for="admin in admins" :key="admin.id">
<td>{{ admin.id }}</td>
<td>{{ admin.user_id }}</td>
<td>{{ admin.password }}</td>
<td>Love you</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
mahasiswas: [],
mahasiswas_uri: "/admin/resource/mahasiswas",
};
},
methods: {
loadData() {
axios.get(this.mahasiswas_uri).then((response) => {
$.when(this.putAsyncData(response.data)).then(function () {
$("#datatable").DataTable();
});
});
},
putAsyncData(data) {
this.mahasiswas = data;
},
},
mounted() {
this.loadData();
},
};
</script>
......@@ -30,6 +30,7 @@
<li><a href="{{ route('admin.admins') }}">Admins</a></li>
<li><a href="{{ route('admin.users') }}">Users</a></li>
<li><a href="{{ route('admin.databases') }}">Databases</a></li>
<li><a href="{{ route('admin.mahasiswas') }}">Databases</a></li>
</ul>
</li>
</ul>
......
@extends('admin.layouts.base')
@section('content')
<div id="app">
<mahasiswas-component></mahasiswas-component>
</div>
@endsection
@section('stylesheet')
@include('admin.layouts.includes.stylesheets.datatables-stylesheets')
@endsection
@section('script')
@include('admin.layouts.includes.scripts.datatables-scripts')
@endsection
\ No newline at end of file
......@@ -5,6 +5,7 @@ use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AdminController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\AdminerDatabaseController;
use App\Http\Controllers\MahasiswaController;
/*
|--------------------------------------------------------------------------
......@@ -26,19 +27,21 @@ Auth::routes();
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::middleware('admin')->prefix('admin')->name('admin.')->group(function() {
Route::middleware('admin')->prefix('admin')->name('admin.')->group(function () {
Route::get('/dashboard', [AdminController::class, 'dashboard'])->name('dashboard');
Route::get('/users', [AdminController::class, 'users'])->name('users');
Route::get('/admins', [AdminController::class, 'admins'])->name('admins');
Route::get('/mahasiswas', [AdminController::class, 'mahasiswas'])->name('mahasiswas');
Route::get('/databases', [AdminController::class, 'databases'])->name('databases');
Route::prefix('resource')->name('resource.')->group(function(){
Route::prefix('resource')->name('resource.')->group(function () {
Route::get('users/admins', [UserController::class, 'admins']);
Route::resources([
'users' => UserController::class,
'adminerdatabases' => AdminerDatabaseController::class,
'mahasiswas' => MahasiswaController::class,
]);
});
});
\ No newline at end of file
});
{
"lockfileVersion": 1
}
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