├── .editorconfig ├── .env.example ├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── .styleci.yml ├── README.md ├── app ├── Console │ ├── Commands │ │ └── FreshDatabase.php │ └── Kernel.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Admin │ │ │ ├── AdminController.php │ │ │ ├── Book │ │ │ │ ├── AuthorController.php │ │ │ │ ├── BookController.php │ │ │ │ ├── CategoryController.php │ │ │ │ └── PublisherController.php │ │ │ ├── BorrowingController.php │ │ │ ├── ClassroomController.php │ │ │ ├── PasswordController.php │ │ │ ├── RegisterUserController.php │ │ │ ├── ReportController.php │ │ │ └── StudentController.php │ │ ├── Auth │ │ │ ├── ConfirmPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ ├── ResetPasswordController.php │ │ │ └── VerificationController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ └── Student │ │ │ └── HomeController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CheckForMaintenanceMode.php │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── VerifyCsrfToken.php │ │ └── checkRole.php │ └── Requests │ │ ├── AuthorRequest │ │ ├── StoreRequest.php │ │ └── UpdateRequest.php │ │ ├── BookRequest │ │ ├── StoreRequest.php │ │ └── UpdateRequest.php │ │ ├── BorrowingRequest │ │ └── StoreRequest.php │ │ ├── CategoryRequest │ │ ├── StoreRequest.php │ │ └── UpdateRequest.php │ │ ├── ClassroomRequest │ │ ├── StoreRequest.php │ │ └── UpdateRequest.php │ │ ├── PublisherRequest │ │ ├── StoreRequest.php │ │ └── UpdateRequest.php │ │ ├── RegisterRequest │ │ └── StoreRequest.php │ │ └── StudentRequest │ │ ├── StoreRequest.php │ │ └── UpdateRequest.php ├── Models │ ├── Author.php │ ├── Book.php │ ├── Borrowing.php │ ├── Category.php │ ├── Classroom.php │ ├── Publisher.php │ └── Student.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── User.php └── View │ └── Components │ ├── Breadcrumb.php │ ├── Mobilesidebar.php │ ├── Navbar.php │ └── Sidebar.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── cors.php ├── database.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── services.php ├── session.php ├── sweetalert.php └── view.php ├── database ├── .gitignore ├── factories │ └── UserFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2020_12_25_141752_create_students_table.php │ ├── 2020_12_26_034330_create_classrooms_table.php │ ├── 2020_12_28_070739_create_books_table.php │ ├── 2020_12_28_075559_create_categories_table.php │ ├── 2020_12_28_075609_create_authors_table.php │ ├── 2020_12_28_075630_create_publishers_table.php │ └── 2021_01_14_042609_create_borrowings_table.php └── seeds │ ├── AuthorBookSeeder.php │ ├── CategoryBookSeeder.php │ ├── ClassSeeder.php │ ├── DatabaseSeeder.php │ ├── PublisherBookSeeder.php │ ├── StudentSeeder.php │ └── UserSeeder.php ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── assets │ ├── .gitignore │ ├── .prettierrc │ ├── boots │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.js │ ├── css │ │ ├── tailwind.css │ │ └── tailwind.output.css │ ├── img │ │ ├── reading.png │ │ └── user.png │ ├── js │ │ ├── charts-bars.js │ │ ├── charts-lines.js │ │ ├── charts-pie.js │ │ ├── focus-trap.js │ │ └── init-alpine.js │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ └── tailwind.config.js ├── css │ ├── Aclonica.ttf │ ├── BubblegumSans-Regular.otf │ ├── JetBrainsMono-Bold-Italic.ttf │ ├── JetBrainsMono-Bold.ttf │ ├── JetBrainsMono-ExtraBold-Italic.ttf │ ├── JetBrainsMono-ExtraBold.ttf │ ├── JetBrainsMono-Italic.ttf │ ├── JetBrainsMono-Medium-Italic.ttf │ ├── JetBrainsMono-Medium.ttf │ ├── JetBrainsMono-Regular.ttf │ ├── JosefinSans-Italic.ttf │ ├── JosefinSans-Light.ttf │ ├── Mothproof_Script.ttf │ ├── Pacifico.ttf │ ├── SourceCodePro-Black.otf │ ├── SourceCodePro-BlackIt.otf │ ├── SourceCodePro-Bold.otf │ ├── SourceCodePro-BoldIt.otf │ ├── SourceCodePro-ExtraLight.otf │ ├── SourceCodePro-ExtraLightIt.otf │ ├── SourceCodePro-It.otf │ ├── SourceCodePro-Light.otf │ ├── SourceCodePro-LightIt.otf │ ├── SourceCodePro-Medium.otf │ ├── SourceCodePro-MediumIt.otf │ ├── SourceCodePro-Regular.otf │ ├── SourceCodePro-Semibold.otf │ ├── SourceCodePro-SemiboldIt.otf │ ├── app.css │ ├── fontawesome.css │ └── index.css ├── favicon.ico ├── index.php ├── js │ ├── app.js │ └── jquery.min.js ├── logo │ ├── fb.svg │ ├── ig.svg │ ├── logoweb.png │ └── wa.svg ├── mix-manifest.json ├── robots.txt ├── vendor │ └── sweetalert │ │ └── sweetalert.all.js └── web.config ├── resources ├── js │ ├── app.js │ ├── bootstrap.js │ └── components │ │ └── ExampleComponent.vue ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php ├── sass │ ├── _variables.scss │ └── app.scss └── views │ ├── admin │ ├── buku │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ ├── index.blade.php │ │ ├── kategori │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ │ ├── penerbit │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ │ └── pengarang │ │ │ ├── create.blade.php │ │ │ ├── edit.blade.php │ │ │ └── index.blade.php │ ├── dashboard.blade.php │ ├── denda │ │ └── index.blade.php │ ├── kelas │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── laporan │ │ └── peminjaman │ │ │ ├── generate-pdf.blade.php │ │ │ └── index.blade.php │ ├── peminjaman │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── pengguna │ │ ├── create.blade.php │ │ ├── index.blade.php │ │ └── password │ │ │ └── edit.blade.php │ └── siswa │ │ ├── create.blade.php │ │ ├── edit.blade.php │ │ └── index.blade.php │ ├── alert │ └── delete.blade.php │ ├── auth │ ├── login.blade.php │ ├── passwords │ │ ├── confirm.blade.php │ │ ├── email.blade.php │ │ └── reset.blade.php │ ├── register.blade.php │ └── verify.blade.php │ ├── components │ ├── breadcrumb.blade.php │ ├── mobilesidebar.blade.php │ ├── navbar.blade.php │ └── sidebar.blade.php │ ├── layouts │ ├── app.blade.php │ ├── partials │ │ ├── footer.blade.php │ │ └── navbar.blade.php │ └── siswa.blade.php │ ├── siswa │ ├── detail.blade.php │ └── index.blade.php │ └── vendor │ ├── pagination │ ├── bootstrap-4.blade.php │ ├── default.blade.php │ ├── semantic-ui.blade.php │ ├── simple-bootstrap-4.blade.php │ ├── simple-default.blade.php │ ├── simple-tailwind.blade.php │ └── tailwind.blade.php │ └── sweetalert │ └── alert.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Laravel 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL=http://localhost 6 | 7 | LOG_CHANNEL=stack 8 | 9 | DB_CONNECTION=mysql 10 | DB_HOST=127.0.0.1 11 | DB_PORT=3306 12 | DB_DATABASE=laravel 13 | DB_USERNAME=root 14 | DB_PASSWORD= 15 | 16 | BROADCAST_DRIVER=log 17 | CACHE_DRIVER=file 18 | QUEUE_CONNECTION=sync 19 | SESSION_DRIVER=file 20 | SESSION_LIFETIME=120 21 | 22 | REDIS_HOST=127.0.0.1 23 | REDIS_PASSWORD=null 24 | REDIS_PORT=6379 25 | 26 | MAIL_MAILER=smtp 27 | MAIL_HOST=smtp.mailtrap.io 28 | MAIL_PORT=2525 29 | MAIL_USERNAME=null 30 | MAIL_PASSWORD=null 31 | MAIL_ENCRYPTION=null 32 | MAIL_FROM_ADDRESS=null 33 | MAIL_FROM_NAME="${APP_NAME}" 34 | 35 | AWS_ACCESS_KEY_ID= 36 | AWS_SECRET_ACCESS_KEY= 37 | AWS_DEFAULT_REGION=us-east-1 38 | AWS_BUCKET= 39 | 40 | PUSHER_APP_ID= 41 | PUSHER_APP_KEY= 42 | PUSHER_APP_SECRET= 43 | PUSHER_APP_CLUSTER=mt1 44 | 45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 47 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: rizalihwan 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env 7 | .env.backup 8 | .phpunit.result.cache 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | disabled: 4 | - unused_use 5 | finder: 6 | not-name: 7 | - index.php 8 | - server.php 9 | js: 10 | finder: 11 | not-name: 12 | - webpack.mix.js 13 | css: true 14 | -------------------------------------------------------------------------------- /app/Console/Commands/FreshDatabase.php: -------------------------------------------------------------------------------- 1 | call('migrate:fresh'); 41 | $this->call('db:seed'); 42 | $this->info('command has been successfully for fresh db & run seeder.'); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 28 | } 29 | 30 | /** 31 | * Register the commands for the application. 32 | * 33 | * @return void 34 | */ 35 | protected function commands() 36 | { 37 | $this->load(__DIR__.'/Commands'); 38 | 39 | require base_path('routes/console.php'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | id)->count(); 29 | $categories[] = $pj->name; 30 | $data[] = $pinjam; 31 | } 32 | } catch (\Exception $err) { 33 | return "Error: " . $err->getMessage(); 34 | } 35 | 36 | return view('admin.dashboard', [ 37 | 'books' => Book::count(), 38 | 'classrooms' => Classroom::count(), 39 | 'students' => Student::count(), 40 | 'admins' => User::where('role', 'admin')->count(), 41 | 'categories' => $categories, 42 | 'data' => $data 43 | ]); 44 | } 45 | 46 | /** 47 | * Show the form for creating a new resource. 48 | * 49 | * @return \Illuminate\Http\Response 50 | */ 51 | public function create() 52 | { 53 | // 54 | } 55 | 56 | /** 57 | * Store a newly created resource in storage. 58 | * 59 | * @param \Illuminate\Http\Request $request 60 | * @return \Illuminate\Http\Response 61 | */ 62 | public function store(Request $request) 63 | { 64 | // 65 | } 66 | 67 | /** 68 | * Display the specified resource. 69 | * 70 | * @param int $id 71 | * @return \Illuminate\Http\Response 72 | */ 73 | public function show($id) 74 | { 75 | // 76 | } 77 | 78 | /** 79 | * Show the form for editing the specified resource. 80 | * 81 | * @param int $id 82 | * @return \Illuminate\Http\Response 83 | */ 84 | public function edit($id) 85 | { 86 | // 87 | } 88 | 89 | /** 90 | * Update the specified resource in storage. 91 | * 92 | * @param \Illuminate\Http\Request $request 93 | * @param int $id 94 | * @return \Illuminate\Http\Response 95 | */ 96 | public function update(Request $request, $id) 97 | { 98 | // 99 | } 100 | 101 | /** 102 | * Remove the specified resource from storage. 103 | * 104 | * @param int $id 105 | * @return \Illuminate\Http\Response 106 | */ 107 | public function destroy($id) 108 | { 109 | // 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Book/AuthorController.php: -------------------------------------------------------------------------------- 1 | Author::latest()->paginate(5) 24 | ]); 25 | } 26 | 27 | /** 28 | * Show the form for creating a new resource. 29 | * 30 | * @return \Illuminate\Http\Response 31 | */ 32 | public function create() 33 | { 34 | return view('admin.buku.pengarang.create'); 35 | } 36 | 37 | /** 38 | * Store a newly created resource in storage. 39 | * 40 | * @param \Illuminate\Http\Request $request 41 | * @return \Illuminate\Http\Response 42 | */ 43 | public function store(StoreRequest $request) 44 | { 45 | try{ 46 | Author::create($request->all()); 47 | } catch(\Exception $err) { 48 | return "Error: " . $err->getMessage(); 49 | } 50 | 51 | Alert::success('Informasi Pesan!', 'Pengarang Baru Berhasil ditambahkan'); 52 | return redirect()->route('admin.pengarang.index'); 53 | } 54 | 55 | /** 56 | * Display the specified resource. 57 | * 58 | * @param int $id 59 | * @return \Illuminate\Http\Response 60 | */ 61 | public function show($id) 62 | { 63 | // 64 | } 65 | 66 | /** 67 | * Show the form for editing the specified resource. 68 | * 69 | * @param int $id 70 | * @return \Illuminate\Http\Response 71 | */ 72 | public function edit($id) 73 | { 74 | $author = Author::findOrFail($id); 75 | return view('admin.buku.pengarang.edit', compact('author')); 76 | } 77 | 78 | /** 79 | * Update the specified resource in storage. 80 | * 81 | * @param \Illuminate\Http\Request $request 82 | * @param int $id 83 | * @return \Illuminate\Http\Response 84 | */ 85 | public function update(UpdateRequest $request, $id) 86 | { 87 | try{ 88 | Author::findOrFail($id)->update($request->all()); 89 | } catch(\Exception $err) { 90 | return "Error: " . $err->getMessage(); 91 | } 92 | 93 | Alert::success('Informasi Pesan!', 'Pengarang Berhasil diupdate'); 94 | return redirect()->route('admin.pengarang.index'); 95 | } 96 | 97 | /** 98 | * Remove the specified resource from storage. 99 | * 100 | * @param int $id 101 | * @return \Illuminate\Http\Response 102 | */ 103 | public function destroy($id) 104 | { 105 | $author = Author::findOrFail($id); 106 | $author->delete(); 107 | $author->book()->delete(); 108 | Borrowing::truncate(); 109 | Alert::success('Informasi Pesan!', 'Pengarang Berhasil dihapus!'); 110 | return back(); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Book/CategoryController.php: -------------------------------------------------------------------------------- 1 | Category::latest()->paginate(5) 23 | ]); 24 | } 25 | 26 | /** 27 | * Show the form for creating a new resource. 28 | * 29 | * @return \Illuminate\Http\Response 30 | */ 31 | public function create() 32 | { 33 | return view('admin.buku.kategori.create'); 34 | } 35 | 36 | /** 37 | * Store a newly created resource in storage. 38 | * 39 | * @param \Illuminate\Http\Request $request 40 | * @return \Illuminate\Http\Response 41 | */ 42 | public function store(StoreRequest $request) 43 | { 44 | Category::create($request->all()); 45 | Alert::success('Informasi Pesan!', 'Kategori Baru Berhasil ditambahkan'); 46 | return redirect()->route('admin.kategori.index'); 47 | } 48 | 49 | /** 50 | * Display the specified resource. 51 | * 52 | * @param int $id 53 | * @return \Illuminate\Http\Response 54 | */ 55 | public function show($id) 56 | { 57 | // 58 | } 59 | 60 | /** 61 | * Show the form for editing the specified resource. 62 | * 63 | * @param int $id 64 | * @return \Illuminate\Http\Response 65 | */ 66 | public function edit($id) 67 | { 68 | $category = Category::findOrFail($id); 69 | return view('admin.buku.kategori.edit', compact('category')); 70 | } 71 | 72 | /** 73 | * Update the specified resource in storage. 74 | * 75 | * @param \Illuminate\Http\Request $request 76 | * @param int $id 77 | * @return \Illuminate\Http\Response 78 | */ 79 | public function update(UpdateRequest $request, $id) 80 | { 81 | Category::findOrFail($id)->update($request->all()); 82 | Alert::success('Informasi Pesan!', 'Kategori Berhasil diupdate'); 83 | return redirect()->route('admin.kategori.index'); 84 | } 85 | 86 | /** 87 | * Remove the specified resource from storage. 88 | * 89 | * @param int $id 90 | * @return \Illuminate\Http\Response 91 | */ 92 | public function destroy($id) 93 | { 94 | $category = Category::findOrFail($id); 95 | $category->delete(); 96 | $category->book()->delete(); 97 | Borrowing::truncate(); 98 | Alert::success('Informasi Pesan!', 'Kategori Berhasil dihapus!'); 99 | return back(); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Book/PublisherController.php: -------------------------------------------------------------------------------- 1 | Publisher::latest()->paginate(5) 23 | ]); 24 | } 25 | 26 | /** 27 | * Show the form for creating a new resource. 28 | * 29 | * @return \Illuminate\Http\Response 30 | */ 31 | public function create() 32 | { 33 | return view('admin.buku.penerbit.create'); 34 | } 35 | 36 | /** 37 | * Store a newly created resource in storage. 38 | * 39 | * @param \Illuminate\Http\Request $request 40 | * @return \Illuminate\Http\Response 41 | */ 42 | public function store(StoreRequest $request) 43 | { 44 | Publisher::create($request->all()); 45 | Alert::success('Informasi Pesan!', 'Penerbit Baru Berhasil ditambahkan'); 46 | return redirect()->route('admin.penerbit.index'); 47 | } 48 | 49 | /** 50 | * Display the specified resource. 51 | * 52 | * @param int $id 53 | * @return \Illuminate\Http\Response 54 | */ 55 | public function show($id) 56 | { 57 | // 58 | } 59 | 60 | /** 61 | * Show the form for editing the specified resource. 62 | * 63 | * @param int $id 64 | * @return \Illuminate\Http\Response 65 | */ 66 | public function edit($id) 67 | { 68 | $publisher = Publisher::findOrFail($id); 69 | return view('admin.buku.penerbit.edit', compact('publisher')); 70 | } 71 | 72 | /** 73 | * Update the specified resource in storage. 74 | * 75 | * @param \Illuminate\Http\Request $request 76 | * @param int $id 77 | * @return \Illuminate\Http\Response 78 | */ 79 | public function update(UpdateRequest $request, $id) 80 | { 81 | Publisher::findOrFail($id)->update($request->all()); 82 | Alert::success('Informasi Pesan!', 'Penerbit Berhasil diupdate'); 83 | return redirect()->route('admin.penerbit.index'); 84 | } 85 | 86 | /** 87 | * Remove the specified resource from storage. 88 | * 89 | * @param int $id 90 | * @return \Illuminate\Http\Response 91 | */ 92 | public function destroy($id) 93 | { 94 | $publisher = Publisher::findOrFail($id); 95 | $publisher->delete(); 96 | $publisher->book()->delete(); 97 | Borrowing::truncate(); 98 | Alert::success('Informasi Pesan!', 'Penerbit Berhasil dihapus!'); 99 | return back(); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ClassroomController.php: -------------------------------------------------------------------------------- 1 | Classroom::orderBy('name', 'ASC')->paginate(5) 24 | ]); 25 | } 26 | 27 | /** 28 | * Show the form for creating a new resource. 29 | * 30 | * @return \Illuminate\Http\Response 31 | */ 32 | public function create() 33 | { 34 | return view('admin.kelas.create'); 35 | } 36 | 37 | /** 38 | * Store a newly created resource in storage. 39 | * 40 | * @param \Illuminate\Http\Request $request 41 | * @return \Illuminate\Http\Response 42 | */ 43 | public function store(StoreRequest $request) 44 | { 45 | Classroom::create($request->all()); 46 | Alert::success('Informasi Pesan!', 'Kelas Baru Berhasil ditambahkan'); 47 | return redirect()->route('admin.kelas.index'); 48 | } 49 | 50 | /** 51 | * Display the specified resource. 52 | * 53 | * @param int $id 54 | * @return \Illuminate\Http\Response 55 | */ 56 | public function show($id) 57 | { 58 | // 59 | } 60 | 61 | /** 62 | * Show the form for editing the specified resource. 63 | * 64 | * @param int $id 65 | * @return \Illuminate\Http\Response 66 | */ 67 | public function edit($id) 68 | { 69 | $classroom = Classroom::findOrFail($id); 70 | return view('admin.kelas.edit', compact('classroom')); 71 | } 72 | 73 | /** 74 | * Update the specified resource in storage. 75 | * 76 | * @param \Illuminate\Http\Request $request 77 | * @param int $id 78 | * @return \Illuminate\Http\Response 79 | */ 80 | public function update(UpdateRequest $request, $id) 81 | { 82 | Classroom::findOrFail($id)->update($request->all()); 83 | Alert::success('Informasi Pesan!', 'Kelas Berhasil diupdate'); 84 | return redirect()->route('admin.kelas.index'); 85 | } 86 | 87 | /** 88 | * Remove the specified resource from storage. 89 | * 90 | * @param int $id 91 | * @return \Illuminate\Http\Response 92 | */ 93 | public function destroy($id) 94 | { 95 | $classroom = Classroom::findOrFail($id); 96 | $classroom->delete(); 97 | $classroom->students()->delete(); 98 | Alert::success('Informasi Pesan!', 'Kelas Berhasil dihapus!'); 99 | return back(); 100 | } 101 | 102 | public function delete_all_class() 103 | { 104 | Classroom::truncate(); 105 | Student::truncate(); 106 | Borrowing::truncate(); 107 | Alert::success('Informasi Pesan!', 'Kelas Berhasil dibersihkan semua!'); 108 | return back(); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/PasswordController.php: -------------------------------------------------------------------------------- 1 | validate(request(),[ 19 | 'old_password' => 'required', 20 | 'password' => ['required', 'string', 'min:8', 'confirmed'], 21 | ]); 22 | $currentPassword = auth()->user()->password; 23 | $old_password = request('old_password'); 24 | 25 | if(Hash::check($old_password, $currentPassword)) 26 | { 27 | auth()->user()->update([ 28 | 'password' => bcrypt(request('password')) 29 | ]); 30 | Alert::success('Informasi Pesan!', 'Password Berhasil diganti'); 31 | return redirect()->route('admin.dashboard'); 32 | } else { 33 | Alert::warning('Informasi Pesan!', 'Password lama Tidak Valid!'); 34 | return back(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/RegisterUserController.php: -------------------------------------------------------------------------------- 1 | User::orderBy('name', 'ASC')->where('id', '!=', auth()->user()->id)->paginate(5) 22 | ]); 23 | } 24 | 25 | /** 26 | * Show the form for creating a new resource. 27 | * 28 | * @return \Illuminate\Http\Response 29 | */ 30 | public function create() 31 | { 32 | return view('admin.pengguna.create'); 33 | } 34 | 35 | /** 36 | * Store a newly created resource in storage. 37 | * 38 | * @param \Illuminate\Http\Request $request 39 | * @return \Illuminate\Http\Response 40 | */ 41 | public function store(StoreRequest $request) 42 | { 43 | User::create([ 44 | 'name' => $request->name, 45 | 'username' => $request->username, 46 | 'role' => $request->role, 47 | 'password' => bcrypt( $request->password) 48 | ]); 49 | Alert::success('Informasi Pesan!', 'Pengguna Baru Berhasil ditambahkan'); 50 | return redirect()->route('admin.pengguna.index'); 51 | } 52 | 53 | /** 54 | * Display the specified resource. 55 | * 56 | * @param int $id 57 | * @return \Illuminate\Http\Response 58 | */ 59 | public function show($id) 60 | { 61 | // 62 | } 63 | 64 | /** 65 | * Show the form for editing the specified resource. 66 | * 67 | * @param int $id 68 | * @return \Illuminate\Http\Response 69 | */ 70 | public function edit($id) 71 | { 72 | // 73 | } 74 | 75 | /** 76 | * Update the specified resource in storage. 77 | * 78 | * @param \Illuminate\Http\Request $request 79 | * @param int $id 80 | * @return \Illuminate\Http\Response 81 | */ 82 | public function update(Request $request, $id) 83 | { 84 | // 85 | } 86 | 87 | /** 88 | * Remove the specified resource from storage. 89 | * 90 | * @param int $id 91 | * @return \Illuminate\Http\Response 92 | */ 93 | public function destroy($id) 94 | { 95 | if(auth()->user()->role == 'admin') 96 | { 97 | User::findOrFail($id)->delete(); 98 | Alert::success('Informasi Pesan!', 'Pengguna Berhasil dihapus!'); 99 | return back(); 100 | } else { 101 | Alert::warning('Informasi Pesan!', 'Gagal dihapus dikarenakan anda bukan ADMIN!'); 102 | return back(); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/ReportController.php: -------------------------------------------------------------------------------- 1 | $this->autoNumber, 23 | 'borrowings' => Borrowing::with('student', 'book')->orderBy('borrow_code', 'ASC')->where('borrow_date', $search)->get() 24 | ]); 25 | } 26 | 27 | public function generateReportPdf() 28 | { 29 | $search = request('borrow_date'); 30 | $borrowings = Borrowing::with('student', 'book')->orderBy('borrow_code', 'ASC')->where('borrow_date', $search)->get(); 31 | $pdf = PDF::loadview('admin.laporan.peminjaman.generate-pdf', [ 32 | 'autoNum' => $this->autoNumber, 33 | 'borrowings'=> $borrowings 34 | ]); 35 | return $pdf->stream(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/StudentController.php: -------------------------------------------------------------------------------- 1 | Student::orderBy('first_name', 'ASC')->paginate(5) 23 | ]); 24 | } 25 | 26 | /** 27 | * Show the form for creating a new resource. 28 | * 29 | * @return \Illuminate\Http\Response 30 | */ 31 | public function create() 32 | { 33 | return view('admin.siswa.create', [ 34 | 'classrooms' => Classroom::orderBy('name', 'ASC')->get() 35 | ]); 36 | } 37 | 38 | /** 39 | * Store a newly created resource in storage. 40 | * 41 | * @param \Illuminate\Http\Request $request 42 | * @return \Illuminate\Http\Response 43 | */ 44 | public function store(StoreRequest $request) 45 | { 46 | Student::create($request->all()); 47 | Alert::success('Informasi Pesan!', 'Siswa Baru Berhasil ditambahkan'); 48 | return redirect()->route('admin.siswa.index'); 49 | } 50 | 51 | /** 52 | * Display the specified resource. 53 | * 54 | * @param int $id 55 | * @return \Illuminate\Http\Response 56 | */ 57 | public function show($id) 58 | { 59 | // 60 | } 61 | 62 | /** 63 | * Show the form for editing the specified resource. 64 | * 65 | * @param int $id 66 | * @return \Illuminate\Http\Response 67 | */ 68 | public function edit($id) 69 | { 70 | return view('admin.siswa.edit', [ 71 | 'student' => Student::findOrFail($id), 72 | 'classrooms' => Classroom::orderBy('name', 'ASC')->get() 73 | ]); 74 | } 75 | 76 | /** 77 | * Update the specified resource in storage. 78 | * 79 | * @param \Illuminate\Http\Request $request 80 | * @param int $id 81 | * @return \Illuminate\Http\Response 82 | */ 83 | public function update(UpdateRequest $request, $id) 84 | { 85 | Student::findOrFail($id)->update($request->all()); 86 | Alert::success('Informasi Pesan!', 'Siswa Berhasil diupdate'); 87 | return redirect()->route('admin.siswa.index'); 88 | } 89 | 90 | /** 91 | * Remove the specified resource from storage. 92 | * 93 | * @param int $id 94 | * @return \Illuminate\Http\Response 95 | */ 96 | public function destroy($id) 97 | { 98 | $student = Student::findOrFail($id); 99 | $student->delete(); 100 | $student->borrowing()->delete(); 101 | Alert::success('Informasi Pesan!', 'Siswa Berhasil dihapus!'); 102 | return back(); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ConfirmPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest')->except('logout'); 39 | } 40 | 41 | protected function redirectTo() 42 | { 43 | if(auth()->user()->role == 'admin') 44 | { 45 | return $this->redirectTo = route('admin.dashboard'); 46 | } else { 47 | return $this->redirectTo = route('siswa.index'); 48 | } 49 | } 50 | 51 | public function authenticated() 52 | { 53 | if(auth()->user()->role == 'admin') 54 | { 55 | Alert::success('Message Information', 'Selamat Datang Admin'); 56 | } else { 57 | Alert::success('Message Information', 'Selamat Datang Siswa'); 58 | } 59 | } 60 | 61 | public function username() 62 | { 63 | return 'username'; 64 | } 65 | 66 | public function logout() 67 | { 68 | $this->guard()->logout(); 69 | Alert::success('Message Information', 'Logout Sukses'); 70 | return redirect()->route('login'); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 43 | } 44 | 45 | /** 46 | * Get a validator for an incoming registration request. 47 | * 48 | * @param array $data 49 | * @return \Illuminate\Contracts\Validation\Validator 50 | */ 51 | protected function validator(array $data) 52 | { 53 | return Validator::make($data, [ 54 | 'name' => ['required', 'string', 'max:255'], 55 | 'username' => ['required', 'string', 'max:255', 'unique:users,username'], 56 | 'role' => ['required'], 57 | 'password' => ['required', 'string', 'min:8', 'confirmed'] 58 | ]); 59 | } 60 | 61 | /** 62 | * Create a new user instance after a valid registration. 63 | * 64 | * @param array $data 65 | * @return \App\User 66 | */ 67 | protected function create(array $data) 68 | { 69 | return User::create([ 70 | 'name' => $data['name'], 71 | 'username' => $data['username'], 72 | 'role' => $data['role'], 73 | 'password' => Hash::make($data['password']), 74 | ]); 75 | } 76 | 77 | public function registered() 78 | { 79 | Alert::success('Message Information', 'Register Successfully!'); 80 | $this->guard()->logout(); 81 | return back(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 39 | $this->middleware('signed')->only('verify'); 40 | $this->middleware('throttle:6,1')->only('verify', 'resend'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 18 | } 19 | 20 | /** 21 | * Show the application dashboard. 22 | * 23 | * @return \Illuminate\Contracts\Support\Renderable 24 | */ 25 | public function index() 26 | { 27 | // return view('home'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Controllers/Student/HomeController.php: -------------------------------------------------------------------------------- 1 | $this->titleDefault, 22 | 'books' => Book::where('stock', '>=', 1)->paginate(3), 23 | 'categories' => Category::orderBy('name', 'ASC')->get() 24 | ]); 25 | } 26 | 27 | public function bookLatest() 28 | { 29 | return view('siswa.index', [ 30 | 'title' => $this->titleLatest, 31 | 'books' => Book::where('stock', '>=', 1)->latest()->paginate(3), 32 | 'categories' => Category::orderBy('name', 'ASC')->get() 33 | ]); 34 | } 35 | 36 | public function bookAsc() 37 | { 38 | return view('siswa.index', [ 39 | 'title' => $this->titleAsc, 40 | 'books' => Book::orderBy('name', 'ASC')->where('stock', '>=', 1)->paginate(3), 41 | 'categories' => Category::orderBy('name', 'ASC')->get() 42 | ]); 43 | } 44 | 45 | public function bookDesc() 46 | { 47 | return view('siswa.index', [ 48 | 'title' => $this->titleDesc, 49 | 'books' => Book::orderBy('name', 'DESC')->where('stock', '>=', 1)->paginate(3), 50 | 'categories' => Category::orderBy('name', 'ASC')->get() 51 | ]); 52 | } 53 | 54 | public function categoryShow($id) 55 | { 56 | $data = Category::findOrFail($id); 57 | return view('siswa.index', [ 58 | 'title' => "Kategori : " . $data->name, 59 | 'books' => $data->book()->where('stock', '>=', 1)->latest()->paginate(3), 60 | 'categories' => Category::orderBy('name', 'ASC')->get() 61 | ]); 62 | } 63 | 64 | public function authorShow($id) 65 | { 66 | $data = Author::findOrFail($id); 67 | return view('siswa.index', [ 68 | 'title' => "Pengarang : " . $data->name, 69 | 'books' => $data->book()->where('stock', '>=', 1)->latest()->paginate(3), 70 | 'categories' => Category::orderBy('name', 'ASC')->get() 71 | ]); 72 | } 73 | 74 | public function search() 75 | { 76 | $query = request('query'); 77 | if($query != null) 78 | { 79 | $books = Book::with('category', 'author', 'publisher') 80 | ->where('stock', '>=', 1) 81 | ->where("name", "like", "%$query%") 82 | ->orWhere("book_code", "like", "%$query%") 83 | ->orWhere("description", "like", "%$query%") 84 | ->latest()->paginate(3); 85 | } else { 86 | $books = Book::where('stock', '>=', 1)->paginate(3); 87 | } 88 | return view('siswa.index', [ 89 | 'title' => "Pencarian : " . $query, 90 | 'books' => $books, 91 | 'categories' => Category::orderBy('name', 'ASC')->get() 92 | ]); 93 | } 94 | 95 | public function detail($id) 96 | { 97 | $book = Book::findOrFail($id); 98 | return view('siswa.detail', compact('book')); 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | 'throttle:60,1', 44 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | ], 46 | ]; 47 | 48 | /** 49 | * The application's route middleware. 50 | * 51 | * These middleware may be assigned to groups or used individually. 52 | * 53 | * @var array 54 | */ 55 | protected $routeMiddleware = [ 56 | 'auth' => \App\Http\Middleware\Authenticate::class, 57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 58 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 63 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 66 | 'checkRole' => \App\Http\Middleware\checkRole::class 67 | ]; 68 | } 69 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | }else if(! $requets->expectsJson()){ 20 | return route('login'); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Middleware/CheckForMaintenanceMode.php: -------------------------------------------------------------------------------- 1 | check()) { 22 | return redirect(RouteServiceProvider::HOME); 23 | } 24 | 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | user()->role,$roles)) 20 | { 21 | return $next($request); 22 | } 23 | Alert::warning('Butuh Kunci untuk Mengakses URL!'); 24 | return back(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Requests/AuthorRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3|unique:authors,name' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/AuthorRequest/UpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/BookRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3|unique:books,book_code', 28 | 'name' => 'required|min:3|max:65', 29 | 'description' => 'required|min:3', 30 | 'thumbnail' => 'required|mimes:png,jpg,svg,jpeg,ico|max:2048', 31 | 'category_id' => 'required', 32 | 'author_id' => 'required', 33 | 'publisher_id' => 'required', 34 | 'publication_year' => 'required|min:4|max:4', 35 | 'isbn' => 'required|min:15|max:22', 36 | 'stock' => 'required|min:1|alpha_num' 37 | ]; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Requests/BookRequest/UpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3', 28 | 'name' => 'required|min:3|max:65', 29 | 'description' => 'required|min:3', 30 | 'thumbnail' => 'mimes:png,jpg,svg,jpeg,ico|max:2048', 31 | 'category_id' => 'required', 32 | 'author_id' => 'required', 33 | 'publisher_id' => 'required', 34 | 'publication_year' => 'required|min:4|max:4', 35 | 'isbn' => 'required|min:15|max:22', 36 | 'stock' => 'required|min:1|alpha_num' 37 | ]; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Requests/BorrowingRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3|unique:borrowings,borrow_code', 28 | 'student_id' => 'required', 29 | 'book_id' => 'required', 30 | 'borrow_date' => 'required|date', 31 | 'return_date' => 'required|date' 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Requests/CategoryRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3|unique:categories,name' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/CategoryRequest/UpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/ClassroomRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3|unique:classrooms,name' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/ClassroomRequest/UpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/PublisherRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3|unique:publishers,name' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/PublisherRequest/UpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|max:30|min:3' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Requests/RegisterRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'string', 'max:255'], 28 | 'username' => ['required', 'string', 'max:255', 'unique:users,username'], 29 | 'role' => ['required'], 30 | 'password' => ['required', 'string', 'min:8', 'confirmed'] 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Requests/StudentRequest/StoreRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3|unique:students,nisn', 28 | 'first_name' => 'required|min:3|max:50', 29 | 'last_name' => 'required|min:3|max:50', 30 | 'gender' => 'required', 31 | 'classroom_id' => 'required', 32 | 'date_of_birth' => 'required|date' 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Requests/StudentRequest/UpdateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:3', 28 | 'first_name' => 'required|min:3|max:50', 29 | 'last_name' => 'required|min:3|max:50', 30 | 'gender' => 'required', 31 | 'classroom_id' => 'required', 32 | 'date_of_birth' => 'required|date' 33 | ]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Models/Author.php: -------------------------------------------------------------------------------- 1 | hasMany(Book::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Models/Book.php: -------------------------------------------------------------------------------- 1 | belongsTo(Category::class); 18 | } 19 | 20 | //one bookdetail have one author 21 | public function author() 22 | { 23 | return $this->belongsTo(Author::class); 24 | } 25 | 26 | //one bookdetail have one publisher 27 | public function publisher() 28 | { 29 | return $this->belongsTo(Publisher::class); 30 | } 31 | 32 | //one book have many borrowing 33 | public function borrowing() 34 | { 35 | return $this->hasMany(Borrowing::class); 36 | } 37 | 38 | // book status accessor 39 | public function getBookStatusAttribute() 40 | { 41 | return $this->stock >= 1 ? 'tersedia' : 'kosong'; 42 | } 43 | 44 | // img book accessor 45 | public function getBookImgAttribute() 46 | { 47 | return "/storage/" . $this->thumbnail; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/Models/Borrowing.php: -------------------------------------------------------------------------------- 1 | belongsTo(Student::class); 18 | } 19 | 20 | //one borrowing have one book 21 | public function book() 22 | { 23 | return $this->belongsTo(Book::class); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/Category.php: -------------------------------------------------------------------------------- 1 | hasMany(Book::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Models/Classroom.php: -------------------------------------------------------------------------------- 1 | hasMany(Student::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Models/Publisher.php: -------------------------------------------------------------------------------- 1 | hasMany(Book::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Models/Student.php: -------------------------------------------------------------------------------- 1 | belongsTo(Classroom::class); 18 | } 19 | 20 | //one student have one borrowing 21 | public function borrowing() 22 | { 23 | return $this->hasOne(Borrowing::class); 24 | } 25 | 26 | 27 | // fullname accessor 28 | public function getFullNameAttribute() 29 | { 30 | return $this->first_name." ".$this->last_name; 31 | } 32 | 33 | // gender accessor 34 | public function getFilterGenderAttribute() 35 | { 36 | return $this->gender == 0 ? 'Laki - Laki' : 'Perempuan'; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 19 | SendEmailVerificationNotification::class, 20 | ], 21 | ]; 22 | 23 | /** 24 | * Register any events for your application. 25 | * 26 | * @return void 27 | */ 28 | public function boot() 29 | { 30 | parent::boot(); 31 | 32 | // 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 45 | 46 | $this->mapWebRoutes(); 47 | 48 | // 49 | } 50 | 51 | /** 52 | * Define the "web" routes for the application. 53 | * 54 | * These routes all receive session state, CSRF protection, etc. 55 | * 56 | * @return void 57 | */ 58 | protected function mapWebRoutes() 59 | { 60 | Route::middleware('web') 61 | ->namespace($this->namespace) 62 | ->group(base_path('routes/web.php')); 63 | } 64 | 65 | /** 66 | * Define the "api" routes for the application. 67 | * 68 | * These routes are typically stateless. 69 | * 70 | * @return void 71 | */ 72 | protected function mapApiRoutes() 73 | { 74 | Route::prefix('api') 75 | ->middleware('api') 76 | ->namespace($this->namespace) 77 | ->group(base_path('routes/api.php')); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | 'datetime', 38 | ]; 39 | } 40 | -------------------------------------------------------------------------------- /app/View/Components/Breadcrumb.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": [ 6 | "framework", 7 | "laravel" 8 | ], 9 | "license": "MIT", 10 | "require": { 11 | "php": "^7.2.5", 12 | "barryvdh/laravel-dompdf": "^0.9.0", 13 | "fideloper/proxy": "^4.2", 14 | "fruitcake/laravel-cors": "^2.0", 15 | "guzzlehttp/guzzle": "^6.3", 16 | "laravel/framework": "^7.24", 17 | "laravel/tinker": "^2.0", 18 | "laravel/ui": "^2.4", 19 | "realrashid/sweet-alert": "^3.2" 20 | }, 21 | "require-dev": { 22 | "facade/ignition": "^2.0", 23 | "fzaninotto/faker": "^1.9.1", 24 | "mockery/mockery": "^1.3.1", 25 | "nunomaduro/collision": "^4.1", 26 | "phpunit/phpunit": "^8.5" 27 | }, 28 | "config": { 29 | "optimize-autoloader": true, 30 | "preferred-install": "dist", 31 | "sort-packages": true 32 | }, 33 | "extra": { 34 | "laravel": { 35 | "dont-discover": [] 36 | } 37 | }, 38 | "autoload": { 39 | "psr-4": { 40 | "App\\": "app/" 41 | }, 42 | "classmap": [ 43 | "database/seeds", 44 | "database/factories" 45 | ] 46 | }, 47 | "autoload-dev": { 48 | "psr-4": { 49 | "Tests\\": "tests/" 50 | } 51 | }, 52 | "minimum-stability": "dev", 53 | "prefer-stable": true, 54 | "scripts": { 55 | "post-autoload-dump": [ 56 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 57 | "@php artisan package:discover --ansi" 58 | ], 59 | "post-root-package-install": [ 60 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 61 | ], 62 | "post-create-project-cmd": [ 63 | "@php artisan key:generate --ansi" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'redis' => [ 45 | 'driver' => 'redis', 46 | 'connection' => 'default', 47 | ], 48 | 49 | 'log' => [ 50 | 'driver' => 'log', 51 | ], 52 | 53 | 'null' => [ 54 | 'driver' => 'null', 55 | ], 56 | 57 | ], 58 | 59 | ]; 60 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Cloud Filesystem Disk 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Many applications store files both locally and in the cloud. For this 24 | | reason, you may specify a default "cloud" driver here. This driver 25 | | will be bound as the Cloud disk implementation in the container. 26 | | 27 | */ 28 | 29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Filesystem Disks 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may configure as many filesystem "disks" as you wish, and you 37 | | may even configure multiple disks of the same driver. Defaults have 38 | | been setup for each driver as an example of the required options. 39 | | 40 | | Supported Drivers: "local", "ftp", "sftp", "s3" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('app'), 49 | ], 50 | 51 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'url' => env('APP_URL').'/storage', 55 | 'visibility' => 'public', 56 | ], 57 | 58 | 's3' => [ 59 | 'driver' => 's3', 60 | 'key' => env('AWS_ACCESS_KEY_ID'), 61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 62 | 'region' => env('AWS_DEFAULT_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | 'url' => env('AWS_URL'), 65 | 'endpoint' => env('AWS_ENDPOINT'), 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Symbolic Links 73 | |-------------------------------------------------------------------------- 74 | | 75 | | Here you may configure the symbolic links that will be created when the 76 | | `storage:link` Artisan command is executed. The array keys should be 77 | | the locations of the links and the values should be their targets. 78 | | 79 | */ 80 | 81 | 'links' => [ 82 | public_path('storage') => storage_path('app/public'), 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 1024, 48 | 'threads' => 2, 49 | 'time' => 2, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /config/logging.php: -------------------------------------------------------------------------------- 1 | env('LOG_CHANNEL', 'stack'), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Log Channels 25 | |-------------------------------------------------------------------------- 26 | | 27 | | Here you may configure the log channels for your application. Out of 28 | | the box, Laravel uses the Monolog PHP logging library. This gives 29 | | you a variety of powerful log handlers / formatters to utilize. 30 | | 31 | | Available Drivers: "single", "daily", "slack", "syslog", 32 | | "errorlog", "monolog", 33 | | "custom", "stack" 34 | | 35 | */ 36 | 37 | 'channels' => [ 38 | 'stack' => [ 39 | 'driver' => 'stack', 40 | 'channels' => ['single'], 41 | 'ignore_exceptions' => false, 42 | ], 43 | 44 | 'single' => [ 45 | 'driver' => 'single', 46 | 'path' => storage_path('logs/laravel.log'), 47 | 'level' => 'debug', 48 | ], 49 | 50 | 'daily' => [ 51 | 'driver' => 'daily', 52 | 'path' => storage_path('logs/laravel.log'), 53 | 'level' => 'debug', 54 | 'days' => 14, 55 | ], 56 | 57 | 'slack' => [ 58 | 'driver' => 'slack', 59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'), 60 | 'username' => 'Laravel Log', 61 | 'emoji' => ':boom:', 62 | 'level' => 'critical', 63 | ], 64 | 65 | 'papertrail' => [ 66 | 'driver' => 'monolog', 67 | 'level' => 'debug', 68 | 'handler' => SyslogUdpHandler::class, 69 | 'handler_with' => [ 70 | 'host' => env('PAPERTRAIL_URL'), 71 | 'port' => env('PAPERTRAIL_PORT'), 72 | ], 73 | ], 74 | 75 | 'stderr' => [ 76 | 'driver' => 'monolog', 77 | 'handler' => StreamHandler::class, 78 | 'formatter' => env('LOG_STDERR_FORMATTER'), 79 | 'with' => [ 80 | 'stream' => 'php://stderr', 81 | ], 82 | ], 83 | 84 | 'syslog' => [ 85 | 'driver' => 'syslog', 86 | 'level' => 'debug', 87 | ], 88 | 89 | 'errorlog' => [ 90 | 'driver' => 'errorlog', 91 | 'level' => 'debug', 92 | ], 93 | 94 | 'null' => [ 95 | 'driver' => 'monolog', 96 | 'handler' => NullHandler::class, 97 | ], 98 | 99 | 'emergency' => [ 100 | 'path' => storage_path('logs/laravel.log'), 101 | ], 102 | ], 103 | 104 | ]; 105 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'sync'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 90, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 90, 49 | 'block_for' => 0, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => env('AWS_ACCESS_KEY_ID'), 55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'), 58 | 'suffix' => env('SQS_SUFFIX'), 59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 60 | ], 61 | 62 | 'redis' => [ 63 | 'driver' => 'redis', 64 | 'connection' => 'default', 65 | 'queue' => env('REDIS_QUEUE', 'default'), 66 | 'retry_after' => 90, 67 | 'block_for' => null, 68 | ], 69 | 70 | ], 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Failed Queue Jobs 75 | |-------------------------------------------------------------------------- 76 | | 77 | | These options configure the behavior of failed queue job logging so you 78 | | can control which database and table are used to store the jobs that 79 | | have failed. You may change them to any database / table you wish. 80 | | 81 | */ 82 | 83 | 'failed' => [ 84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 85 | 'database' => env('DB_CONNECTION', 'mysql'), 86 | 'table' => 'failed_jobs', 87 | ], 88 | 89 | ]; 90 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | *.sqlite-journal 3 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | define(User::class, function (Faker $faker) { 21 | return [ 22 | 'name' => $faker->name, 23 | 'email' => $faker->unique()->safeEmail, 24 | 'email_verified_at' => now(), 25 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 26 | 'remember_token' => Str::random(10), 27 | ]; 28 | }); 29 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name'); 19 | $table->string('username')->unique(); 20 | $table->string('password'); 21 | $table->string('role', 50); 22 | $table->rememberToken(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('users'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token'); 19 | $table->timestamp('created_at')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->text('connection'); 19 | $table->text('queue'); 20 | $table->longText('payload'); 21 | $table->longText('exception'); 22 | $table->timestamp('failed_at')->useCurrent(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::dropIfExists('failed_jobs'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2020_12_25_141752_create_students_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('nisn')->unique(); 19 | $table->string('first_name', 50); 20 | $table->string('last_name', 50); 21 | $table->boolean('gender'); 22 | $table->foreignId('classroom_id'); 23 | $table->date('date_of_birth'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('students'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2020_12_26_034330_create_classrooms_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name', 35)->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('classrooms'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2020_12_28_070739_create_books_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('book_code')->unique(); 19 | $table->string('name'); 20 | $table->longText('description'); 21 | $table->string('thumbnail'); 22 | $table->foreignId('category_id'); //kategori 23 | $table->foreignId('author_id'); //pengarang 24 | $table->foreignId('publisher_id'); //penerbit 25 | $table->year('publication_year'); //tahun terbit 26 | $table->string('isbn', 50); 27 | $table->integer('stock'); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('books'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2020_12_28_075559_create_categories_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('categories'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2020_12_28_075609_create_authors_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('authors'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2020_12_28_075630_create_publishers_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('name')->unique(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('publishers'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2021_01_14_042609_create_borrowings_table.php: -------------------------------------------------------------------------------- 1 | id(); 18 | $table->string('borrow_code')->unique(); 19 | $table->foreignId('student_id'); 20 | $table->foreignId('book_id');//selama ada stok pilihan select option buku akan ada 21 | $table->date('borrow_date');//tanggal pinjam 22 | $table->date('return_date');//tanggal kembali 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('borrowings'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/seeds/AuthorBookSeeder.php: -------------------------------------------------------------------------------- 1 | $author 20 | ]); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/CategoryBookSeeder.php: -------------------------------------------------------------------------------- 1 | $category 20 | ]); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/ClassSeeder.php: -------------------------------------------------------------------------------- 1 | $classroom 20 | ]); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserSeeder::class); 15 | $this->call(ClassSeeder::class); 16 | $this->call(StudentSeeder::class); 17 | $this->call(AuthorBookSeeder::class); 18 | $this->call(CategoryBookSeeder::class); 19 | $this->call(PublisherBookSeeder::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/seeds/PublisherBookSeeder.php: -------------------------------------------------------------------------------- 1 | $publisher 20 | ]); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/StudentSeeder.php: -------------------------------------------------------------------------------- 1 | random_int(1, 9). 18068 . random_int(1, 9), 20 | 'first_name' => $faker->name, 21 | 'last_name' => $faker->name, 22 | 'gender' => random_int(0, 1), 23 | 'classroom_id' => 1, 24 | 'date_of_birth' => now() 25 | ]); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/seeds/UserSeeder.php: -------------------------------------------------------------------------------- 1 | 'Rizal I. Sulaiman', 17 | 'username' => 'admin', 18 | 'password' => bcrypt('password'), 19 | 'role' => 'admin' 20 | ]); 21 | 22 | User::create([ 23 | 'name' => 'Rizal Ganteng', 24 | 'username' => 'siswa', 25 | 'password' => bcrypt('password'), 26 | 'role' => 'siswa' 27 | ]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "npm run development", 5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 6 | "watch": "npm run development -- --watch", 7 | "watch-poll": "npm run watch -- --watch-poll", 8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js", 9 | "prod": "npm run production", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "axios": "^0.19", 14 | "bootstrap": "^4.0.0", 15 | "cross-env": "^7.0", 16 | "jquery": "^3.2", 17 | "laravel-mix": "^5.0.1", 18 | "lodash": "^4.17.19", 19 | "popper.js": "^1.12", 20 | "resolve-url-loader": "^2.3.1", 21 | "sass": "^1.20.1", 22 | "sass-loader": "^8.0.0", 23 | "vue": "^2.5.17", 24 | "vue-template-compiler": "^2.6.10" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/assets/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /public/assets/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "htmlWhitespaceSensitivity": "ignore", 3 | "singleQuote": true, 4 | "semi": false 5 | } 6 | -------------------------------------------------------------------------------- /public/assets/css/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /public/assets/img/reading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/assets/img/reading.png -------------------------------------------------------------------------------- /public/assets/img/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/assets/img/user.png -------------------------------------------------------------------------------- /public/assets/js/charts-bars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * For usage, visit Chart.js docs https://www.chartjs.org/docs/latest/ 3 | */ 4 | const barConfig = { 5 | type: 'bar', 6 | data: { 7 | labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], 8 | datasets: [ 9 | { 10 | label: 'Shoes', 11 | backgroundColor: '#0694a2', 12 | // borderColor: window.chartColors.red, 13 | borderWidth: 1, 14 | data: [-3, 14, 52, 74, 33, 90, 70], 15 | }, 16 | { 17 | label: 'Bags', 18 | backgroundColor: '#7e3af2', 19 | // borderColor: window.chartColors.blue, 20 | borderWidth: 1, 21 | data: [66, 33, 43, 12, 54, 62, 84], 22 | }, 23 | ], 24 | }, 25 | options: { 26 | responsive: true, 27 | legend: { 28 | display: false, 29 | }, 30 | }, 31 | } 32 | 33 | const barsCtx = document.getElementById('bars') 34 | window.myBar = new Chart(barsCtx, barConfig) 35 | -------------------------------------------------------------------------------- /public/assets/js/charts-lines.js: -------------------------------------------------------------------------------- 1 | /** 2 | * For usage, visit Chart.js docs https://www.chartjs.org/docs/latest/ 3 | */ 4 | const lineConfig = { 5 | type: 'line', 6 | data: { 7 | labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], 8 | datasets: [{ 9 | label: 'Organic', 10 | /** 11 | * These colors come from Tailwind CSS palette 12 | * https://tailwindcss.com/docs/customizing-colors/#default-color-palette 13 | */ 14 | backgroundColor: '#0694a2', 15 | borderColor: '#0694a2', 16 | data: [43, 48, 40, 54, 67, 73, 70], 17 | fill: false, 18 | }, 19 | { 20 | label: 'Paid', 21 | fill: false, 22 | /** 23 | * These colors come from Tailwind CSS palette 24 | * https://tailwindcss.com/docs/customizing-colors/#default-color-palette 25 | */ 26 | backgroundColor: '#7e3af2', 27 | borderColor: '#7e3af2', 28 | data: [24, 50, 64, 74, 52, 51, 65], 29 | }, 30 | ], 31 | }, 32 | options: { 33 | responsive: true, 34 | /** 35 | * Default legends are ugly and impossible to style. 36 | * See examples in charts.html to add your own legends 37 | * */ 38 | legend: { 39 | display: false, 40 | }, 41 | tooltips: { 42 | mode: 'index', 43 | intersect: false, 44 | }, 45 | hover: { 46 | mode: 'nearest', 47 | intersect: true, 48 | }, 49 | scales: { 50 | x: { 51 | display: true, 52 | scaleLabel: { 53 | display: true, 54 | labelString: 'Month', 55 | }, 56 | }, 57 | y: { 58 | display: true, 59 | scaleLabel: { 60 | display: true, 61 | labelString: 'Value', 62 | }, 63 | }, 64 | }, 65 | }, 66 | } 67 | 68 | // change this to the id of your chart element in HMTL 69 | const lineCtx = document.getElementById('line') 70 | window.myLine = new Chart(lineCtx, lineConfig) -------------------------------------------------------------------------------- /public/assets/js/charts-pie.js: -------------------------------------------------------------------------------- 1 | /** 2 | * For usage, visit Chart.js docs https://www.chartjs.org/docs/latest/ 3 | */ 4 | const pieConfig = { 5 | type: 'doughnut', 6 | data: { 7 | datasets: [ 8 | { 9 | data: [33, 33, 33], 10 | /** 11 | * These colors come from Tailwind CSS palette 12 | * https://tailwindcss.com/docs/customizing-colors/#default-color-palette 13 | */ 14 | backgroundColor: ['#0694a2', '#1c64f2', '#7e3af2'], 15 | label: 'Dataset 1', 16 | }, 17 | ], 18 | labels: ['Shoes', 'Shirts', 'Bags'], 19 | }, 20 | options: { 21 | responsive: true, 22 | cutoutPercentage: 80, 23 | /** 24 | * Default legends are ugly and impossible to style. 25 | * See examples in charts.html to add your own legends 26 | * */ 27 | legend: { 28 | display: false, 29 | }, 30 | }, 31 | } 32 | 33 | // change this to the id of your chart element in HMTL 34 | const pieCtx = document.getElementById('pie') 35 | window.myPie = new Chart(pieCtx, pieConfig) 36 | -------------------------------------------------------------------------------- /public/assets/js/focus-trap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Limit focus to focusable elements inside `element` 3 | * @param {HTMLElement} element - DOM element to focus trap inside 4 | * @return {Function} cleanup function 5 | */ 6 | function focusTrap(element) { 7 | const focusableElements = getFocusableElements(element) 8 | const firstFocusableEl = focusableElements[0] 9 | const lastFocusableEl = focusableElements[focusableElements.length - 1] 10 | 11 | // Wait for the case the element was not yet rendered 12 | setTimeout(() => firstFocusableEl.focus(), 50) 13 | 14 | /** 15 | * Get all focusable elements inside `element` 16 | * @param {HTMLElement} element - DOM element to focus trap inside 17 | * @return {HTMLElement[]} List of focusable elements 18 | */ 19 | function getFocusableElements(element = document) { 20 | return [ 21 | ...element.querySelectorAll( 22 | 'a, button, details, input, select, textarea, [tabindex]:not([tabindex="-1"])' 23 | ), 24 | ].filter((e) => !e.hasAttribute('disabled')) 25 | } 26 | 27 | function handleKeyDown(e) { 28 | const TAB = 9 29 | const isTab = e.key.toLowerCase() === 'tab' || e.keyCode === TAB 30 | 31 | if (!isTab) return 32 | 33 | if (e.shiftKey) { 34 | if (document.activeElement === firstFocusableEl) { 35 | lastFocusableEl.focus() 36 | e.preventDefault() 37 | } 38 | } else { 39 | if (document.activeElement === lastFocusableEl) { 40 | firstFocusableEl.focus() 41 | e.preventDefault() 42 | } 43 | } 44 | } 45 | 46 | element.addEventListener('keydown', handleKeyDown) 47 | 48 | return function cleanup() { 49 | element.removeEventListener('keydown', handleKeyDown) 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /public/assets/js/init-alpine.js: -------------------------------------------------------------------------------- 1 | function data() { 2 | function getThemeFromLocalStorage() { 3 | // if user already changed the theme, use it 4 | if (window.localStorage.getItem('dark')) { 5 | return JSON.parse(window.localStorage.getItem('dark')) 6 | } 7 | 8 | // else return their preferences 9 | return ( 10 | !!window.matchMedia && 11 | window.matchMedia('(prefers-color-scheme: dark)').matches 12 | ) 13 | } 14 | 15 | function setThemeToLocalStorage(value) { 16 | window.localStorage.setItem('dark', value) 17 | } 18 | 19 | return { 20 | dark: getThemeFromLocalStorage(), 21 | toggleTheme() { 22 | this.dark = !this.dark 23 | setThemeToLocalStorage(this.dark) 24 | }, 25 | isSideMenuOpen: false, 26 | toggleSideMenu() { 27 | this.isSideMenuOpen = !this.isSideMenuOpen 28 | }, 29 | closeSideMenu() { 30 | this.isSideMenuOpen = false 31 | }, 32 | isNotificationsMenuOpen: false, 33 | toggleNotificationsMenu() { 34 | this.isNotificationsMenuOpen = !this.isNotificationsMenuOpen 35 | }, 36 | closeNotificationsMenu() { 37 | this.isNotificationsMenuOpen = false 38 | }, 39 | isProfileMenuOpen: false, 40 | toggleProfileMenu() { 41 | this.isProfileMenuOpen = !this.isProfileMenuOpen 42 | }, 43 | closeProfileMenu() { 44 | this.isProfileMenuOpen = false 45 | }, 46 | isPagesMenuOpen: false, 47 | togglePagesMenu() { 48 | this.isPagesMenuOpen = !this.isPagesMenuOpen 49 | }, 50 | // Modal 51 | isModalOpen: false, 52 | trapCleanup: null, 53 | openModal() { 54 | this.isModalOpen = true 55 | this.trapCleanup = focusTrap(document.querySelector('#modal')) 56 | }, 57 | closeModal() { 58 | this.isModalOpen = false 59 | this.trapCleanup() 60 | }, 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /public/assets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "windmill-dashboard", 3 | "version": "1.0.2", 4 | "description": "A multi theme, completely accessible, with components and pages examples, ready for production dashboard.", 5 | "scripts": { 6 | "tailwind": "tailwindcss build public/assets/css/tailwind.css -o public/assets/css/tailwind.output.css", 7 | "build": "env NODE_ENV=production postcss public/assets/css/tailwind.css -o public/assets/css/tailwind.output.css", 8 | "cz": "git-cz", 9 | "release": "release-it" 10 | }, 11 | "author": "Estevan Maito ", 12 | "license": "MIT", 13 | "devDependencies": { 14 | "@release-it/conventional-changelog": "1.1.4", 15 | "@tailwindcss/custom-forms": "0.2.1", 16 | "autoprefixer": "9.8.0", 17 | "color": "3.1.2", 18 | "commitizen": "4.1.2", 19 | "cssnano": "4.1.10", 20 | "cz-conventional-changelog": "3.2.0", 21 | "postcss-cli": "7.1.1", 22 | "release-it": "13.6.4", 23 | "tailwindcss": "1.4.6", 24 | "tailwindcss-multi-theme": "1.0.3" 25 | }, 26 | "keywords": [ 27 | "tailwind", 28 | "windmill", 29 | "dashboard", 30 | "template", 31 | "admin" 32 | ], 33 | "release-it": { 34 | "github": { 35 | "release": true 36 | }, 37 | "npm": { 38 | "publish": false 39 | }, 40 | "plugins": { 41 | "@release-it/conventional-changelog": { 42 | "preset": "angular", 43 | "infile": "CHANGELOG.md" 44 | } 45 | } 46 | }, 47 | "config": { 48 | "commitizen": { 49 | "path": "./node_modules/cz-conventional-changelog" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /public/assets/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('tailwindcss'), 4 | require('autoprefixer'), 5 | require('cssnano')({ 6 | preset: 'default', 7 | }), 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /public/css/Aclonica.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/Aclonica.ttf -------------------------------------------------------------------------------- /public/css/BubblegumSans-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/BubblegumSans-Regular.otf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-Bold-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-Bold-Italic.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-Bold.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-ExtraBold-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-ExtraBold-Italic.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-ExtraBold.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-Italic.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-Medium-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-Medium-Italic.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-Medium.ttf -------------------------------------------------------------------------------- /public/css/JetBrainsMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JetBrainsMono-Regular.ttf -------------------------------------------------------------------------------- /public/css/JosefinSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JosefinSans-Italic.ttf -------------------------------------------------------------------------------- /public/css/JosefinSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/JosefinSans-Light.ttf -------------------------------------------------------------------------------- /public/css/Mothproof_Script.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/Mothproof_Script.ttf -------------------------------------------------------------------------------- /public/css/Pacifico.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/Pacifico.ttf -------------------------------------------------------------------------------- /public/css/SourceCodePro-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-Black.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-BlackIt.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-BlackIt.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-Bold.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-BoldIt.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-BoldIt.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-ExtraLight.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-ExtraLight.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-ExtraLightIt.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-ExtraLightIt.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-It.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-It.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-Light.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-LightIt.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-LightIt.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-Medium.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-MediumIt.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-MediumIt.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-Regular.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-Semibold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-Semibold.otf -------------------------------------------------------------------------------- /public/css/SourceCodePro-SemiboldIt.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/css/SourceCodePro-SemiboldIt.otf -------------------------------------------------------------------------------- /public/css/index.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Font Saja"; 3 | src: url('Aclonica.ttf'); 4 | } 5 | 6 | @font-face { 7 | font-family: "Font Welcome"; 8 | src: url('Pacifico.ttf'); 9 | } 10 | 11 | @font-face { 12 | font-family: "a-josep"; 13 | src: url('JosefinSans-Italic.ttf'); 14 | } 15 | 16 | @font-face { 17 | font-family: "SourceCodePro-Black"; 18 | src: url('SourceCodePro-MediumIt.otf'); 19 | } 20 | 21 | @font-face { 22 | font-family: "title-book"; 23 | src: url('BubblegumSans-Regular.otf'); 24 | } 25 | 26 | @font-face { 27 | font-family: "SourceCodePro-SemiboldIt"; 28 | src: url('SourceCodePro-Regular.otf'); 29 | } 30 | 31 | @font-face { 32 | font-family: "Mothproof_Script"; 33 | src: url('Mothproof_Script.ttf'); 34 | } 35 | 36 | @font-face { 37 | font-family: "Jetbrains_Mono"; 38 | src: url('JetBrainsMono-Regular.ttf'); 39 | } 40 | 41 | @font-face { 42 | font-family: "font_detail_book"; 43 | src: url('BubblegumSans-Regular.otf '); 44 | } 45 | 46 | .detail-section-name { 47 | margin: 0 0 0 10px; 48 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | define('LARAVEL_START', microtime(true)); 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Register The Auto Loader 15 | |-------------------------------------------------------------------------- 16 | | 17 | | Composer provides a convenient, automatically generated class loader for 18 | | our application. We just need to utilize it! We'll simply require it 19 | | into the script here so that we don't have to worry about manual 20 | | loading any of our classes later on. It feels great to relax. 21 | | 22 | */ 23 | 24 | require __DIR__.'/../vendor/autoload.php'; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Turn On The Lights 29 | |-------------------------------------------------------------------------- 30 | | 31 | | We need to illuminate PHP development, so let us turn on the lights. 32 | | This bootstraps the framework and gets it ready for use, then it 33 | | will load up this application so that we can run it and send 34 | | the responses back to the browser and delight our users. 35 | | 36 | */ 37 | 38 | $app = require_once __DIR__.'/../bootstrap/app.php'; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Run The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once we have the application, we can handle the incoming request 46 | | through the kernel, and send the associated response back to 47 | | the client's browser allowing them to enjoy the creative 48 | | and wonderful application we have prepared for them. 49 | | 50 | */ 51 | 52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 53 | 54 | $response = $kernel->handle( 55 | $request = Illuminate\Http\Request::capture() 56 | ); 57 | 58 | $response->send(); 59 | 60 | $kernel->terminate($request, $response); 61 | -------------------------------------------------------------------------------- /public/js/app.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/js/app.js -------------------------------------------------------------------------------- /public/logo/logoweb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rizalihwan/perpustakaan/e2dcc6467603a86e4749878803b26fd7238fd1c1/public/logo/logoweb.png -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * First we will load all of this project's JavaScript dependencies which 3 | * includes Vue and other libraries. It is a great starting point when 4 | * building robust, powerful web applications using Vue and Laravel. 5 | */ 6 | 7 | require('./bootstrap'); 8 | 9 | window.Vue = require('vue'); 10 | 11 | /** 12 | * The following block of code may be used to automatically register your 13 | * Vue components. It will recursively scan this directory for the Vue 14 | * components and automatically register them with their "basename". 15 | * 16 | * Eg. ./components/ExampleComponent.vue -> 17 | */ 18 | 19 | // const files = require.context('./', true, /\.vue$/i) 20 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)) 21 | 22 | Vue.component('example-component', require('./components/ExampleComponent.vue').default); 23 | 24 | /** 25 | * Next, we will create a fresh Vue application instance and attach it to 26 | * the page. Then, you may begin adding components to this application 27 | * or customize the JavaScript scaffolding to fit your unique needs. 28 | */ 29 | 30 | const app = new Vue({ 31 | el: '#app', 32 | }); 33 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 5 | * for JavaScript based Bootstrap features such as modals and tabs. This 6 | * code may be modified to fit the specific needs of your application. 7 | */ 8 | 9 | try { 10 | window.Popper = require('popper.js').default; 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap'); 14 | } catch (e) {} 15 | 16 | /** 17 | * We'll load the axios HTTP library which allows us to easily issue requests 18 | * to our Laravel back-end. This library automatically handles sending the 19 | * CSRF token as a header based on the value of the "XSRF" token cookie. 20 | */ 21 | 22 | window.axios = require('axios'); 23 | 24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 25 | 26 | /** 27 | * Echo exposes an expressive API for subscribing to channels and listening 28 | * for events that are broadcast by Laravel. Echo and event broadcasting 29 | * allows your team to easily build robust real-time web applications. 30 | */ 31 | 32 | // import Echo from 'laravel-echo'; 33 | 34 | // window.Pusher = require('pusher-js'); 35 | 36 | // window.Echo = new Echo({ 37 | // broadcaster: 'pusher', 38 | // key: process.env.MIX_PUSHER_APP_KEY, 39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 40 | // forceTLS: true 41 | // }); 42 | -------------------------------------------------------------------------------- /resources/js/components/ExampleComponent.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/sass/_variables.scss: -------------------------------------------------------------------------------- 1 | // Body 2 | $body-bg: #f8fafc; 3 | 4 | // Typography 5 | $font-family-sans-serif: 'Nunito', sans-serif; 6 | $font-size-base: 0.9rem; 7 | $line-height-base: 1.6; 8 | 9 | // Colors 10 | $blue: #3490dc; 11 | $indigo: #6574cd; 12 | $purple: #9561e2; 13 | $pink: #f66d9b; 14 | $red: #e3342f; 15 | $orange: #f6993f; 16 | $yellow: #ffed4a; 17 | $green: #38c172; 18 | $teal: #4dc0b5; 19 | $cyan: #6cb2eb; 20 | -------------------------------------------------------------------------------- /resources/sass/app.scss: -------------------------------------------------------------------------------- 1 | // Fonts 2 | @import url('https://fonts.googleapis.com/css?family=Nunito'); 3 | 4 | // Variables 5 | @import 'variables'; 6 | 7 | // Bootstrap 8 | @import '~bootstrap/scss/bootstrap'; 9 | -------------------------------------------------------------------------------- /resources/views/admin/buku/kategori/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Kategori']) 2 | 3 | @section('content') 4 | 5 |

6 | Daftar Kategori 7 |

8 |
9 |
10 | @csrf 11 | 12 | 23 | 24 |
25 | 35 | 36 |
37 |
38 | @endsection 39 | -------------------------------------------------------------------------------- /resources/views/admin/buku/kategori/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Kategori']) 2 | 3 | @section('content') 4 | 5 |

6 | Edit Kategori 7 |

8 |
9 |
10 | @csrf 11 | @method('PATCH') 12 | 23 | 24 |
25 | 35 | 36 |
37 |
38 | @endsection 39 | -------------------------------------------------------------------------------- /resources/views/admin/buku/penerbit/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Penerbit']) 2 | 3 | @section('content') 4 | 5 |

8 | Daftar Penerbit 9 |

10 |
13 |
14 | @csrf 15 | 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/buku/penerbit/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Penerbit']) 2 | 3 | @section('content') 4 | 5 |

8 | Edit Penerbit 9 |

10 |
13 |
14 | @csrf 15 | @method('PATCH') 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/buku/pengarang/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Pengarang']) 2 | 3 | @section('content') 4 | 5 |

8 | Daftar Pengarang 9 |

10 |
13 |
14 | @csrf 15 | 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/buku/pengarang/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Pengarang']) 2 | 3 | @section('content') 4 | 5 |

8 | Edit Pengarang 9 |

10 |
13 |
14 | @csrf 15 | @method('PATCH') 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/kelas/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Kelas']) 2 | 3 | @section('content') 4 | 5 |

8 | Daftar Kelas 9 |

10 |
13 |
14 | @csrf 15 | 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/kelas/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Kelas']) 2 | 3 | @section('content') 4 | 5 |

8 | Edit Kelas 9 |

10 |
13 |
14 | @csrf 15 | @method('PATCH') 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/laporan/peminjaman/generate-pdf.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | PDF 8 | 9 | 10 |
11 |

Laporan Peminjaman Buku

12 | Pada Tanggal : {{ request('borrow_date') }} 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @if(request('borrow_date')) 27 | @forelse ($borrowings as $borrowing) 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | @empty 37 | 38 | 39 | 40 | @endforelse 41 | @else 42 | 43 | 44 | 45 | @endif 46 | 47 |
#Kode PeminjamanNama SiswaNama BukuTanggal PinjamTanggal Kembali
{{ $autoNum++ . "." }}{{ $borrowing->borrow_code }}{{ $borrowing->student->FullName }}{{ $borrowing->book->name }}{{ $borrowing->borrow_date }}{{ $borrowing->return_date }}

Laporan Peminjaman pada {{ request('borrow_date') }} Kosong!

Laporan Peminjaman Kosong!

48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /resources/views/admin/peminjaman/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | Peminjaman']) 2 | 3 | @section('content') 4 | 5 |

8 | Edit Peminjaman 9 |

10 |
13 |
14 | @csrf 15 | @method('PATCH') 16 | 28 | 29 |
30 | 38 | 39 |
40 |
41 | @endsection 42 | -------------------------------------------------------------------------------- /resources/views/admin/pengguna/password/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app', ['title' => 'Perpus | ChangePassword']) 2 | 3 | @section('content') 4 | 5 |
8 |
9 | @csrf 10 | @method('PATCH') 11 | 12 | 24 | 25 | 37 | 38 | 45 | 46 |
47 | 55 | 56 |
57 |
58 | @endsection 59 | -------------------------------------------------------------------------------- /resources/views/alert/delete.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/confirm.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Confirm Password') }}
9 | 10 |
11 | {{ __('Please confirm your password before continuing.') }} 12 | 13 |
14 | @csrf 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('password') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | @if (Route::has('password.request')) 37 | 38 | {{ __('Forgot Your Password?') }} 39 | 40 | @endif 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | @endsection 50 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/email.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 | @if (session('status')) 12 | 15 | @endif 16 | 17 |
18 | @csrf 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | @error('email') 27 | 28 | {{ $message }} 29 | 30 | @enderror 31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection 48 | -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Reset Password') }}
9 | 10 |
11 |
12 | @csrf 13 | 14 | 15 | 16 |
17 | 18 | 19 |
20 | 21 | 22 | @error('email') 23 | 24 | {{ $message }} 25 | 26 | @enderror 27 |
28 |
29 | 30 |
31 | 32 | 33 |
34 | 35 | 36 | @error('password') 37 | 38 | {{ $message }} 39 | 40 | @enderror 41 |
42 |
43 | 44 |
45 | 46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /resources/views/auth/verify.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ __('Verify Your Email Address') }}
9 | 10 |
11 | @if (session('resent')) 12 | 15 | @endif 16 | 17 | {{ __('Before proceeding, please check your email for a verification link.') }} 18 | {{ __('If you did not receive the email') }}, 19 |
20 | @csrf 21 | . 22 |
23 |
24 |
25 |
26 |
27 |
28 | @endsection 29 | -------------------------------------------------------------------------------- /resources/views/components/breadcrumb.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
5 |
6 | Menu 7 |
8 | @if (request()->is('admin/dashboard')) 9 | / 10 | Dashboard 11 | 12 | @endif 13 | @if (request()->is('admin/pengguna')) 14 | / 15 | Pengguna 16 | 17 | @endif 18 | @if (request()->is('admin/pengguna/create')) 19 | / 20 | Pengguna / 21 | Create 22 | 23 | @endif 24 | @if (request()->is('admin/account/password')) 25 | / 26 | User / 27 | Ganti Password 28 | 29 | @endif 30 | @if (request()->is('admin/buku')) 31 | / 32 | Manajemen Buku / 33 | Buku 34 | 35 | @endif 36 | @if (request()->is('admin/kategori')) 37 | / 38 | Manajemen Buku / 39 | Kategori 40 | 41 | @endif 42 | @if (request()->is('admin/pengarang')) 43 | / 44 | Manajemen Buku / 45 | Pengarang 46 | 47 | @endif 48 | @if (request()->is('admin/penerbit')) 49 | / 50 | Manajemen Buku / 51 | Penerbit 52 | 53 | @endif 54 | @if (request()->is('admin/kelas')) 55 | / 56 | Kelas 57 | 58 | @endif 59 | @if (request()->is('admin/siswa')) 60 | / 61 | Siswa 62 | 63 | @endif 64 | @if (request()->is('admin/pinjam')) 65 | / 66 | Peminjaman 67 | 68 | @endif 69 | @if (request()->is('admin/borrowing_report') || request()->is('borrowing_report/search')) 70 | / 71 | Laporan Peminjaman 72 | 73 | @endif 74 | @if (request()->is('admin/fine') || request()->is('borrowing_report/search')) 75 | / 76 | Denda 77 | 78 | @endif 79 |
80 | -------------------------------------------------------------------------------- /resources/views/layouts/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ $title ?? 'Perpus' }} 8 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | @auth 26 |
27 | 28 | 29 | 30 | 31 |
32 | 33 | 34 |
35 |
36 | 37 | 38 | 39 | @yield('content') 40 |
41 |
42 |
43 |
44 | @else 45 | @yield('loginContent') 46 | @endauth 47 | @yield('script') 48 | 49 | @include('sweetalert::alert') 50 | 51 | @yield('script') 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /resources/views/layouts/partials/footer.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | Copyright © 2021 Rizal Ihwan 7 |
8 |
9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /resources/views/layouts/siswa.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Aplikasi | Perpustakaan 8 | {{-- web icon --}} 9 | 10 | 11 | 12 | 13 | 22 | @yield('style') 23 | 24 | 25 | {{-- navbar --}} 26 |
27 | @include('layouts.partials.navbar') 28 |
29 | {{-- student content --}} 30 |
31 |
32 | @yield('content') 33 |
34 |
35 | 36 | @include('sweetalert::alert') 37 | {{-- script link --}} 38 | 39 | 40 | 41 | {{-- my script --}} 42 | @yield('script') 43 | 44 | 45 | -------------------------------------------------------------------------------- /resources/views/siswa/detail.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 |
7 | 8 | 9 |
10 |
11 | 12 | 13 |
14 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 46 | @endif 47 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 46 | @endif 47 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/semantic-ui.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 36 | @endif 37 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 27 | @endif 28 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 19 | @endif 20 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-tailwind.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 25 | @endif 26 | -------------------------------------------------------------------------------- /resources/views/vendor/sweetalert/alert.blade.php: -------------------------------------------------------------------------------- 1 | @if (config('sweetalert.alwaysLoadJS') === true && config('sweetalert.neverLoadJS') === false ) 2 | 3 | @endif 4 | @if (Session::has('alert.config')) 5 | @if(config('sweetalert.animation.enable')) 6 | 7 | @endif 8 | @if (config('sweetalert.alwaysLoadJS') === false && config('sweetalert.neverLoadJS') === false) 9 | 10 | @endif 11 | 14 | @endif 15 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); 20 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->describe('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | name('siswa.')->namespace('Student')->middleware(['auth', 'checkRole:siswa'])->group(function(){ 12 | // home 13 | Route::get('/perpus', 'HomeController@index')->name('index'); 14 | Route::get('/perpus/latest', 'HomeController@bookLatest')->name('latest'); 15 | Route::get('/perpus/ascending', 'HomeController@bookAsc')->name('asc'); 16 | Route::get('/perpus/descending', 'HomeController@bookDesc')->name('desc'); 17 | // book orderby category 18 | Route::get('/category_show/{id}', 'HomeController@categoryShow')->name('showcategory'); 19 | // book orderby author 20 | Route::get('/author_show/{id}', 'HomeController@authorShow')->name('showauthor'); 21 | // search book 22 | Route::get('/search', 'HomeController@search')->name('search'); 23 | // book detail 24 | Route::get('/show/{id}', 'HomeController@detail')->name('detail'); 25 | }); 26 | 27 | // admin 28 | Route::prefix('admin')->name('admin.')->namespace('Admin')->middleware(['auth', 'checkRole:admin'])->group(function(){ 29 | // dashboard 30 | Route::get('/dashboard', 'AdminController@index')->name('dashboard'); 31 | // user register 32 | Route::resource('pengguna', 'RegisterUserController'); 33 | // change password 34 | Route::prefix('account')->name('password.')->group(function(){ 35 | Route::get('/password', 'PasswordController@edit')->name('edit'); 36 | Route::patch('/password', 'PasswordController@update')->name('edit'); 37 | }); 38 | // student 39 | Route::resource('siswa', 'StudentController'); 40 | // classroom 41 | Route::resource('kelas', 'ClassroomController')->except('delete_all_class'); 42 | Route::delete('delete_all_class', 'ClassroomController@delete_all_class')->name('kelas.delete'); 43 | // borrowing 44 | Route::resource('pinjam', 'BorrowingController')->except('denda'); 45 | Route::get('/fine', 'BorrowingController@fine')->name('fine'); 46 | // book management 47 | Route::namespace('Book')->group(function(){ 48 | // book 49 | Route::resource('buku', 'BookController'); 50 | // category 51 | Route::resource('kategori', 'CategoryController'); 52 | // author 53 | Route::resource('pengarang', 'AuthorController'); 54 | // publisher 55 | Route::resource('penerbit', 'PublisherController'); 56 | }); 57 | // Borrowing Report 58 | Route::get('/borrowing_report', 'ReportController@borrowingReport')->name('laporan.peminjaman'); 59 | Route::get('/borrowing_report/search', 'ReportController@borrowingReportSearch')->name('laporan.peminjaman.search'); 60 | // generate report borrowing to pdf 61 | Route::get('/borrowing_report/generate', 'ReportController@generateReportPdf')->name('laporan.generate.pdf'); 62 | }); 63 | 64 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel application. By default, we are compiling the Sass 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .sass('resources/sass/app.scss', 'public/css'); 16 | --------------------------------------------------------------------------------