├── .editorconfig
├── .env.example
├── .gitattributes
├── .github
└── workflows
│ └── azure-webapps-php.yml
├── .gitignore
├── .styleci.yml
├── Procfile
├── README.md
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Admin
│ │ │ ├── BukuController.php
│ │ │ ├── DashboardController.php
│ │ │ ├── KategoriController.php
│ │ │ ├── PetugasController.php
│ │ │ ├── PinjamController.php
│ │ │ └── ThumbnailController.php
│ │ ├── Auth
│ │ │ ├── Admin
│ │ │ │ └── LoginController.php
│ │ │ ├── DaftarUserController.php
│ │ │ ├── LoginUserController.php
│ │ │ └── LupaPasswordController.php
│ │ ├── CetakController.php
│ │ ├── Controller.php
│ │ ├── DetailBukuController.php
│ │ ├── IndexController.php
│ │ ├── PinjamBukuController.php
│ │ ├── ProfileController.php
│ │ └── SearchController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── AdminRole.php
│ │ ├── Anggota.php
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── ManageAdmin.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ ├── UserMiddleware.php
│ │ └── VerifyCsrfToken.php
├── Models
│ ├── Aktifitas.php
│ ├── Aktifitasadmin.php
│ ├── Anggota.php
│ ├── Buku.php
│ ├── Kategori.php
│ ├── Pinjaman.php
│ ├── Thumbnail.php
│ └── User.php
└── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.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
├── sanctum.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ ├── BukuFactory.php
│ └── 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
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ ├── 2021_11_14_072950_create_bukus_table.php
│ ├── 2021_11_14_102731_create_kategoris_table.php
│ ├── 2021_11_15_165432_create_thumbnails_table.php
│ ├── 2021_11_16_131706_create_anggotas_table.php
│ ├── 2021_11_18_155808_create_pinjamen_table.php
│ ├── 2021_11_20_102837_create_aktifitas_table.php
│ └── 2021_11_21_091528_create_aktifitasadmins_table.php
└── seeders
│ └── DatabaseSeeder.php
├── package-lock.json
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── assets
│ ├── css
│ │ ├── bootstrapsocial.css
│ │ ├── components.css
│ │ ├── components.css.map
│ │ ├── custom.css
│ │ ├── custom.css.map
│ │ ├── izitoast
│ │ │ └── izitoast.css
│ │ ├── owl-carousel
│ │ │ ├── owl.carousel.css
│ │ │ ├── owl.carousel.min.css
│ │ │ └── owl.theme.default.min.css
│ │ ├── perpustakaan.css
│ │ ├── reverse.css
│ │ ├── rtl.css
│ │ ├── skins
│ │ │ ├── reverse.css
│ │ │ └── reverse.css.map
│ │ ├── style.css
│ │ └── style.css.map
│ ├── fonts
│ │ ├── nunito-v9-latin-600.eot
│ │ ├── nunito-v9-latin-600.svg
│ │ ├── nunito-v9-latin-600.ttf
│ │ ├── nunito-v9-latin-600.woff
│ │ ├── nunito-v9-latin-600.woff2
│ │ ├── nunito-v9-latin-700.eot
│ │ ├── nunito-v9-latin-700.svg
│ │ ├── nunito-v9-latin-700.ttf
│ │ ├── nunito-v9-latin-700.woff
│ │ ├── nunito-v9-latin-700.woff2
│ │ ├── nunito-v9-latin-800.eot
│ │ ├── nunito-v9-latin-800.svg
│ │ ├── nunito-v9-latin-800.ttf
│ │ ├── nunito-v9-latin-800.woff
│ │ ├── nunito-v9-latin-800.woff2
│ │ ├── nunito-v9-latin-regular.eot
│ │ ├── nunito-v9-latin-regular.svg
│ │ ├── nunito-v9-latin-regular.ttf
│ │ ├── nunito-v9-latin-regular.woff
│ │ ├── nunito-v9-latin-regular.woff2
│ │ └── vazir
│ │ │ ├── Farsi-Digits-Without-Latin
│ │ │ ├── Vazir-Black-FD-WOL.eot
│ │ │ ├── Vazir-Black-FD-WOL.ttf
│ │ │ ├── Vazir-Black-FD-WOL.woff
│ │ │ ├── Vazir-Black-FD-WOL.woff2
│ │ │ ├── Vazir-Bold-FD-WOL.eot
│ │ │ ├── Vazir-Bold-FD-WOL.ttf
│ │ │ ├── Vazir-Bold-FD-WOL.woff
│ │ │ ├── Vazir-Bold-FD-WOL.woff2
│ │ │ ├── Vazir-FD-WOL.eot
│ │ │ ├── Vazir-FD-WOL.ttf
│ │ │ ├── Vazir-FD-WOL.woff
│ │ │ ├── Vazir-FD-WOL.woff2
│ │ │ ├── Vazir-Light-FD-WOL.eot
│ │ │ ├── Vazir-Light-FD-WOL.ttf
│ │ │ ├── Vazir-Light-FD-WOL.woff
│ │ │ ├── Vazir-Light-FD-WOL.woff2
│ │ │ ├── Vazir-Medium-FD-WOL.eot
│ │ │ ├── Vazir-Medium-FD-WOL.ttf
│ │ │ ├── Vazir-Medium-FD-WOL.woff
│ │ │ ├── Vazir-Medium-FD-WOL.woff2
│ │ │ ├── Vazir-Thin-FD-WOL.eot
│ │ │ ├── Vazir-Thin-FD-WOL.ttf
│ │ │ ├── Vazir-Thin-FD-WOL.woff
│ │ │ └── Vazir-Thin-FD-WOL.woff2
│ │ │ ├── Farsi-Digits
│ │ │ ├── Vazir-Black-FD.eot
│ │ │ ├── Vazir-Black-FD.ttf
│ │ │ ├── Vazir-Black-FD.woff
│ │ │ ├── Vazir-Black-FD.woff2
│ │ │ ├── Vazir-Bold-FD.eot
│ │ │ ├── Vazir-Bold-FD.ttf
│ │ │ ├── Vazir-Bold-FD.woff
│ │ │ ├── Vazir-Bold-FD.woff2
│ │ │ ├── Vazir-FD.eot
│ │ │ ├── Vazir-FD.ttf
│ │ │ ├── Vazir-FD.woff
│ │ │ ├── Vazir-FD.woff2
│ │ │ ├── Vazir-Light-FD.eot
│ │ │ ├── Vazir-Light-FD.ttf
│ │ │ ├── Vazir-Light-FD.woff
│ │ │ ├── Vazir-Light-FD.woff2
│ │ │ ├── Vazir-Medium-FD.eot
│ │ │ ├── Vazir-Medium-FD.ttf
│ │ │ ├── Vazir-Medium-FD.woff
│ │ │ ├── Vazir-Medium-FD.woff2
│ │ │ ├── Vazir-Thin-FD.eot
│ │ │ ├── Vazir-Thin-FD.ttf
│ │ │ ├── Vazir-Thin-FD.woff
│ │ │ └── Vazir-Thin-FD.woff2
│ │ │ ├── LICENSE
│ │ │ ├── Vazir-Black.eot
│ │ │ ├── Vazir-Black.ttf
│ │ │ ├── Vazir-Black.woff
│ │ │ ├── Vazir-Black.woff2
│ │ │ ├── Vazir-Bold.eot
│ │ │ ├── Vazir-Bold.ttf
│ │ │ ├── Vazir-Bold.woff
│ │ │ ├── Vazir-Bold.woff2
│ │ │ ├── Vazir-Light.eot
│ │ │ ├── Vazir-Light.ttf
│ │ │ ├── Vazir-Light.woff
│ │ │ ├── Vazir-Light.woff2
│ │ │ ├── Vazir-Medium.eot
│ │ │ ├── Vazir-Medium.ttf
│ │ │ ├── Vazir-Medium.woff
│ │ │ ├── Vazir-Medium.woff2
│ │ │ ├── Vazir-Thin.eot
│ │ │ ├── Vazir-Thin.ttf
│ │ │ ├── Vazir-Thin.woff
│ │ │ ├── Vazir-Thin.woff2
│ │ │ ├── Vazir.eot
│ │ │ ├── Vazir.ttf
│ │ │ ├── Vazir.woff
│ │ │ ├── Vazir.woff2
│ │ │ ├── Without-Latin
│ │ │ ├── Vazir-Black-WOL.eot
│ │ │ ├── Vazir-Black-WOL.ttf
│ │ │ ├── Vazir-Black-WOL.woff
│ │ │ ├── Vazir-Black-WOL.woff2
│ │ │ ├── Vazir-Bold-WOL.eot
│ │ │ ├── Vazir-Bold-WOL.ttf
│ │ │ ├── Vazir-Bold-WOL.woff
│ │ │ ├── Vazir-Bold-WOL.woff2
│ │ │ ├── Vazir-Light-WOL.eot
│ │ │ ├── Vazir-Light-WOL.ttf
│ │ │ ├── Vazir-Light-WOL.woff
│ │ │ ├── Vazir-Light-WOL.woff2
│ │ │ ├── Vazir-Medium-WOL.eot
│ │ │ ├── Vazir-Medium-WOL.ttf
│ │ │ ├── Vazir-Medium-WOL.woff
│ │ │ ├── Vazir-Medium-WOL.woff2
│ │ │ ├── Vazir-Thin-WOL.eot
│ │ │ ├── Vazir-Thin-WOL.ttf
│ │ │ ├── Vazir-Thin-WOL.woff
│ │ │ ├── Vazir-Thin-WOL.woff2
│ │ │ ├── Vazir-WOL.eot
│ │ │ ├── Vazir-WOL.ttf
│ │ │ ├── Vazir-WOL.woff
│ │ │ └── Vazir-WOL.woff2
│ │ │ ├── font-face.css
│ │ │ └── sample.png
│ ├── img
│ │ ├── avatar
│ │ │ ├── avatar-1.png
│ │ │ ├── avatar-2.png
│ │ │ ├── avatar-3.png
│ │ │ ├── avatar-4.png
│ │ │ └── avatar-5.png
│ │ ├── daftar.svg
│ │ ├── dashboard.svg
│ │ ├── header.svg
│ │ └── login.svg
│ ├── js
│ │ ├── custom.js
│ │ ├── owl-carousel
│ │ │ ├── owl.carousel.js
│ │ │ └── owl.carousel.min.js
│ │ ├── page
│ │ │ ├── chart.js
│ │ │ ├── components-chat-box.js
│ │ │ ├── components-multiple-upload.js
│ │ │ ├── components-table.js
│ │ │ ├── features-post-create.js
│ │ │ ├── features-posts.js
│ │ │ ├── index-0.js
│ │ │ ├── index.js
│ │ │ ├── modules-sweetalert.js
│ │ │ └── modules-toastr.js
│ │ ├── scripts.js
│ │ └── stisla.js
│ └── trixjs
│ │ ├── trix.css
│ │ └── trix.js
├── e-perpus.png
├── favicon.ico
├── index.php
├── robots.txt
└── web.config
├── resources
├── css
│ └── app.css
├── js
│ ├── app.js
│ └── bootstrap.js
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
└── views
│ ├── backend
│ ├── anggota.blade.php
│ ├── buku
│ │ ├── buku.blade.php
│ │ ├── edit-buku.blade.php
│ │ ├── kategori.blade.php
│ │ └── tambah-buku.blade.php
│ ├── dashboard.blade.php
│ ├── layout
│ │ └── main.blade.php
│ ├── login-admin.blade.php
│ ├── partial
│ │ ├── navbar.blade.php
│ │ └── sidebar.blade.php
│ ├── petugas
│ │ ├── edit-petugas.blade.php
│ │ ├── petugas.blade.php
│ │ └── tambah-petugas.blade.php
│ ├── pinjam
│ │ ├── pinjam.blade.php
│ │ └── tambahpinjaman.blade.php
│ └── thumbnail
│ │ ├── tambah-thumbnail.blade.php
│ │ └── thumbnail.blade.php
│ ├── buku-tampil.blade.php
│ ├── cetak
│ ├── cetakdata.blade.php
│ └── cetakpinjaman.blade.php
│ ├── daftar-user.blade.php
│ ├── detail-buku.blade.php
│ ├── index.blade.php
│ ├── layout
│ └── main.blade.php
│ ├── login-user.blade.php
│ ├── lupa-password.blade.php
│ ├── pinjam-buku.blade.php
│ ├── pinjamberhasil.blade.php
│ ├── profil
│ ├── aktifitas.blade.php
│ ├── layout
│ │ └── main.blade.php
│ ├── pinjaman.blade.php
│ └── profile.blade.php
│ ├── search.blade.php
│ ├── semua-buku.blade.php
│ ├── tampil.blade.php
│ └── vendor
│ └── mail
│ ├── html
│ ├── button.blade.php
│ ├── footer.blade.php
│ ├── header.blade.php
│ ├── layout.blade.php
│ ├── message.blade.php
│ ├── panel.blade.php
│ ├── subcopy.blade.php
│ ├── table.blade.php
│ └── themes
│ │ └── default.css
│ └── text
│ ├── button.blade.php
│ ├── footer.blade.php
│ ├── header.blade.php
│ ├── layout.blade.php
│ ├── message.blade.php
│ ├── panel.blade.php
│ ├── subcopy.blade.php
│ └── table.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── clockwork
│ └── .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 |
17 | [docker-compose.yml]
18 | indent_size = 4
19 |
--------------------------------------------------------------------------------
/.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 | LOG_DEPRECATIONS_CHANNEL=null
9 | LOG_LEVEL=debug
10 |
11 | DB_CONNECTION=mysql
12 | DB_HOST=127.0.0.1
13 | DB_PORT=3306
14 | DB_DATABASE=laravel
15 | DB_USERNAME=root
16 | DB_PASSWORD=
17 |
18 | BROADCAST_DRIVER=log
19 | CACHE_DRIVER=file
20 | FILESYSTEM_DRIVER=local
21 | QUEUE_CONNECTION=sync
22 | SESSION_DRIVER=file
23 | SESSION_LIFETIME=120
24 |
25 | MEMCACHED_HOST=127.0.0.1
26 |
27 | REDIS_HOST=127.0.0.1
28 | REDIS_PASSWORD=null
29 | REDIS_PORT=6379
30 |
31 | MAIL_MAILER=smtp
32 | MAIL_HOST=mailhog
33 | MAIL_PORT=1025
34 | MAIL_USERNAME=null
35 | MAIL_PASSWORD=null
36 | MAIL_ENCRYPTION=null
37 | MAIL_FROM_ADDRESS=null
38 | MAIL_FROM_NAME="${APP_NAME}"
39 |
40 | AWS_ACCESS_KEY_ID=
41 | AWS_SECRET_ACCESS_KEY=
42 | AWS_DEFAULT_REGION=us-east-1
43 | AWS_BUCKET=
44 | AWS_USE_PATH_STYLE_ENDPOINT=false
45 |
46 | PUSHER_APP_ID=
47 | PUSHER_APP_KEY=
48 | PUSHER_APP_SECRET=
49 | PUSHER_APP_CLUSTER=mt1
50 |
51 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
52 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
53 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.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 | docker-compose.override.yml
10 | Homestead.json
11 | Homestead.yaml
12 | npm-debug.log
13 | yarn-error.log
14 | /.idea
15 | /.vscode
16 |
--------------------------------------------------------------------------------
/.styleci.yml:
--------------------------------------------------------------------------------
1 | php:
2 | preset: laravel
3 | version: 8
4 | disabled:
5 | - no_unused_imports
6 | finder:
7 | not-name:
8 | - index.php
9 | - server.php
10 | js:
11 | finder:
12 | not-name:
13 | - webpack.mix.js
14 | css: true
15 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: vendor/bin/heroku-php-apache2 public/
--------------------------------------------------------------------------------
/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 | reportable(function (Throwable $e) {
38 | //
39 | });
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/DashboardController.php:
--------------------------------------------------------------------------------
1 | limit(10)->get();
21 | $user = User::whereId(auth()->user()->id)->first();
22 | $petugas = User::whereRole('petugas')->get();
23 | $buku = Buku::orderByDesc('views');
24 | $anggota = Anggota::latest()->get();
25 | $pinjaman = Pinjaman::latest();
26 | return view('backend.dashboard', compact('title', 'user', 'petugas', 'thumbnail', 'buku', 'anggota', 'pinjaman'));
27 | }
28 | public function logout()
29 | {
30 | Request()->session()->regenerateToken();
31 | Request()->session()->invalidate();
32 | User::find(auth()->user()->id)->update(['aktifitas' => 'Logout']);
33 | Auth::logout();
34 | return redirect('/login-admin');
35 | }
36 |
37 | public function anggota()
38 | {
39 | $title = 'Data Anggota';
40 | $user = User::findorFail(auth()->user()->id);
41 | $jumlah = Anggota::get();
42 | if(request('status')){
43 | $anggota = Anggota::where('status', request('status'))->Filter(request(['q']))->latest()->paginate(10)->withQueryString();;
44 | }else {
45 | $anggota = Anggota::Filter(request(['q']))->latest()->paginate(10)->withQueryString();;
46 | }
47 | return view('backend.anggota', compact('title', 'user', 'anggota', 'jumlah'));
48 | }
49 | public function delete(Anggota $anggota)
50 | {
51 | $anggota = Anggota::find($anggota->id);
52 | $anggota->delete($anggota->id);
53 | Aktifitasadmin::create([
54 | 'user_id' => Auth()->user()->id,
55 | 'icon' => 'fas fa-user',
56 | 'backgroud' => 'bg-danger',
57 | 'notifikasi' => Auth()->user()->nama. ' mengahapus anggota ' .$anggota->id_anggota .$anggota->nama,
58 | ]);
59 | return back()->with([
60 | 'alert' => 'success',
61 | 'pesan' => 'Anggota berhasil dihapus',
62 | 'color' => 'green'
63 | ]);
64 | }
65 | public function update(Anggota $anggota, Request $request)
66 | {
67 | $anggota = Anggota::find($anggota->id);
68 | $anggota->update([
69 | 'status' => $request->status,
70 | ]);
71 | Aktifitasadmin::create([
72 | 'user_id' => Auth()->user()->id,
73 | 'icon' => 'fas fa-user',
74 | 'backgroud' => 'bg-primary',
75 | 'notifikasi' => Auth()->user()->nama. ' mengubah status anggota ' .$anggota->id_anggota .$anggota->nama. ' menjadi ' .$request->status,
76 | ]);
77 | return back()->with([
78 | 'alert' => 'success',
79 | 'pesan' => 'Status anggota berhasil diedit',
80 | 'color' => 'green'
81 | ]);
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Admin/ThumbnailController.php:
--------------------------------------------------------------------------------
1 | user()->id)->first();
22 | $thumbnail = Thumbnail::latest()->get();
23 | return view('backend.thumbnail.thumbnail', compact('title', 'user', 'thumbnail'));
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 | $title = 'Tambah Thumbnail';
34 | $user = User::whereId(auth()->user()->id)->first();
35 | return view('backend.thumbnail.tambah-thumbnail', compact('title', 'user'));
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(Request $request)
45 | {
46 | $messages = [
47 | 'required' => 'Gambar wajib diisi!',
48 | 'max' => 'Gambar terlalu besar silahkan dikompress!',
49 | 'file' => ':Inputan bukan gambar!'
50 | ];
51 | $request->validate([
52 | 'gambar' => 'required|image|file|max:2004'
53 | ], $messages);
54 |
55 | Thumbnail::create([
56 | 'link' => $request->link,
57 | 'gambar' => $request->file('gambar')->store('upload/thumbnail')
58 | ]);
59 |
60 | return redirect('admin/thumbnail')->with(['alert' => 'success',
61 | 'pesan' => 'Thumbnail berhasil ditambahkan'
62 | ]);;
63 | }
64 |
65 | /**
66 | * Display the specified resource.
67 | *
68 | * @param int $id
69 | * @return \Illuminate\Http\Response
70 | */
71 | public function show($id)
72 | {
73 | //
74 | }
75 |
76 | /**
77 | * Show the form for editing the specified resource.
78 | *
79 | * @param int $id
80 | * @return \Illuminate\Http\Response
81 | */
82 | public function edit($id)
83 | {
84 | //
85 | }
86 |
87 | /**
88 | * Update the specified resource in storage.
89 | *
90 | * @param \Illuminate\Http\Request $request
91 | * @param int $id
92 | * @return \Illuminate\Http\Response
93 | */
94 | public function update(Request $request, $id)
95 | {
96 | //
97 | }
98 |
99 | /**
100 | * Remove the specified resource from storage.
101 | *
102 | * @param int $id
103 | * @return \Illuminate\Http\Response
104 | */
105 | public function destroy($id)
106 | {
107 | $gambar = Thumbnail::findorFail($id);
108 | if($gambar->gambar){
109 | Storage::delete($gambar->gambar);
110 | }
111 | Thumbnail::destroy($id);
112 | return redirect('admin/thumbnail')->with(['alert' => 'success',
113 | 'pesan' => 'Thumbnail berhasil dihapus'
114 | ]);
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/Admin/LoginController.php:
--------------------------------------------------------------------------------
1 | validate([
42 | 'username' => 'required',
43 | 'password' => 'required'
44 | ]);
45 |
46 | $admin = User::whereUsername($request->username)->first();
47 | if($admin){
48 | if(Hash::check($request->password, $admin->password)){
49 | Auth::login($admin);
50 | User::find($admin->id)->update(['aktifitas' => 'Login']);
51 | return redirect('/admin/dashboard');
52 | }
53 | return back()->with('password', 'Password salah!');
54 | }
55 | return back()->with('username', 'Username tidak ditemukan!');
56 | }
57 |
58 | /**
59 | * Display the specified resource.
60 | *
61 | * @param int $id
62 | * @return \Illuminate\Http\Response
63 | */
64 | public function show($id)
65 | {
66 | //
67 | }
68 |
69 | /**
70 | * Show the form for editing the specified resource.
71 | *
72 | * @param int $id
73 | * @return \Illuminate\Http\Response
74 | */
75 | public function edit($id)
76 | {
77 | //
78 | }
79 |
80 | /**
81 | * Update the specified resource in storage.
82 | *
83 | * @param \Illuminate\Http\Request $request
84 | * @param int $id
85 | * @return \Illuminate\Http\Response
86 | */
87 | public function update(Request $request, $id)
88 | {
89 | //
90 | }
91 |
92 | /**
93 | * Remove the specified resource from storage.
94 | *
95 | * @param int $id
96 | * @return \Illuminate\Http\Response
97 | */
98 | public function destroy($id)
99 | {
100 |
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LoginUserController.php:
--------------------------------------------------------------------------------
1 | get();
23 | return view('login-user', compact('title', 'kat'));
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 | //
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(Request $request)
43 | {
44 | $anggota = Anggota::whereEmail($request->email)->first();
45 | if($anggota){
46 | if(Hash::check($request->password, $anggota->password)){
47 | Auth::guard('anggota')->login($anggota);
48 | Anggota::find($anggota->id)->update(['aktifitas'=>'Login']);
49 | return redirect('/');
50 | }
51 | return back()->with(['password' => 'Password salah!']);
52 | }
53 | return back()->with(['Email', 'Email tidak ditemukan!']);
54 | }
55 |
56 | /**
57 | * Display the specified resource.
58 | *
59 | * @param int $id
60 | * @return \Illuminate\Http\Response
61 | */
62 | public function show($id)
63 | {
64 | //
65 | }
66 |
67 | /**
68 | * Show the form for editing the specified resource.
69 | *
70 | * @param int $id
71 | * @return \Illuminate\Http\Response
72 | */
73 | public function edit($id)
74 | {
75 | //
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(Request $request, $id)
86 | {
87 | //
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 | Auth::guard('anggota')->logout();
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LupaPasswordController.php:
--------------------------------------------------------------------------------
1 | get();
15 | return view('lupa-password', compact('title', 'kat'));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/Http/Controllers/CetakController.php:
--------------------------------------------------------------------------------
1 | first();
15 | $pdf = PDF ::loadview('cetak.cetakpinjaman', compact('pinjaman'))->setPaper('A4', 'portrait');
16 | return $pdf->stream('cetakpinjaman'.$pinjaman->judul_buku.'.pdf');
17 | }
18 | public function cetakpinjaman($user, $pinjaman)
19 | {
20 | $pinjaman = Pinjaman::where('id', $pinjaman)->first();
21 | $pdf = PDF ::loadview('cetak.cetakpinjaman', compact('pinjaman'))->setPaper('A4', 'portrait');
22 | return $pdf->stream('cetakpinjaman'.$pinjaman->judul_buku.'.pdf');
23 | }
24 |
25 | public function cetakdata(Request $request)
26 | {
27 | $pinjaman = Pinjaman::whereBetween('created_at', [$request->dari, $request->sampai])->get();
28 | $pdf = PDF ::loadview('cetak.cetakdata', compact('pinjaman'))->setPaper('a4', 'landscape');
29 | return $pdf->stream('cetakpinjaman.pdf');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | where(['slug'=>$buku, 'status' =>'publish'])->first();
16 |
17 | if(Auth::guard('anggota')->user()){
18 | $pinjam = Pinjaman::where(['email' => Auth::guard('anggota')->user()->email, 'id_anggota' => Auth::guard('anggota')->user()->id_anggota, 'buku_id' => $buku->id])->get();
19 | }else {
20 | $pinjam = null;
21 | }
22 |
23 | if(!$buku){
24 | return abort(404);
25 | }else{
26 | Buku::findOrFail($buku->id)->update(['views'=> $buku->views+1]);
27 | }
28 | $title = $buku->judul_buku;
29 | $bukupopuler = Buku::with(['kategori'])->where(['status' => 'Publish'])->latest()->limit(5)->get();
30 | return view('detail-buku', compact('title','buku', 'bukupopuler', 'pinjam'));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Controllers/IndexController.php:
--------------------------------------------------------------------------------
1 | where(['status' => 'Publish'])->orderByDesc('views')->limit(10)->get();
18 | $thumbnail = Thumbnail::latest()->limit(10)->get();
19 | $kat = Kategori::latest()->get();
20 | return view('index', compact('title','bukupopuler', 'kat', 'thumbnail'));
21 | }
22 | public function tampil(Kategori $kategori)
23 | {
24 | $bukukategori = $kategori->buku->load(['kategori']);
25 | return view('tampil', compact('bukukategori'));
26 | }
27 | public function semuabuku(Kategori $kategori)
28 | {
29 | $buku = Buku::with(['kategori'])->where(['status' => 'Publish'])->latest()->get();
30 | return view('buku-tampil', compact('buku'));
31 | }
32 | public function showkategori(Kategori $kategori)
33 | {
34 | $title = 'Kategori '.$kategori->kategori;
35 | $kat = Kategori::latest()->get();
36 | $buku = $kategori->buku->load(['kategori']);
37 | return view('semua-buku', compact('title','kategori','kat','buku'));
38 | }
39 |
40 | public function logoutuser(Anggota $anggota)
41 | {
42 | if(!Auth::guard('anggota')->user()){
43 | return redirect('/');
44 | }
45 |
46 | $anggota = Anggota::findorfail(Auth::guard('anggota')->user()->id);
47 | Request()->session()->regenerateToken();
48 | Request()->session()->invalidate();
49 | $anggota->update(['aktifitas' => 'logout']);
50 | Auth::guard('anggota')->logout($anggota);
51 | return redirect('/')->with([
52 | 'alert' => 'success',
53 | 'title' => 'Berhasil logout'
54 | ]);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/app/Http/Controllers/PinjamBukuController.php:
--------------------------------------------------------------------------------
1 | Auth::guard('anggota')->user()->email, 'id_anggota' => Auth::guard('anggota')->user()->id_anggota, 'buku_id' => $buku->id])->get();
19 | if($buku->jumlah_buku == 0 OR $pinjam->count()>0){
20 | return back();
21 | }
22 | $title = 'Pinjam Buku';
23 | return view('pinjam-buku', compact('title', 'buku'));
24 | }
25 |
26 | public function pinjam(Request $request, Buku $buku)
27 | {
28 | $request->validate([
29 | 'tgl_pinjam' => 'required',
30 | 'tgl_kembali' => 'required'
31 | ]);
32 |
33 | $data = [
34 | 'id_anggota' => Auth::guard('anggota')->user()->id_anggota,
35 | 'nama_peminjam' => Auth::guard('anggota')->user()->nama,
36 | 'email' => Auth::guard('anggota')->user()->email,
37 | 'jenis_kelamin' => Auth::guard('anggota')->user()->jenis_kelamin,
38 | 'kelas' => Auth::guard('anggota')->user()->kelas,
39 | 'judul_buku' => $buku->judul_buku,
40 | 'buku_id' => $buku->id,
41 | 'tgl_pinjam' => $request->tgl_pinjam,
42 | 'tgl_kembali' => $request->tgl_kembali,
43 | ];
44 |
45 | Aktifitas::create([
46 | 'user_id' => Auth::guard('anggota')->user()->id,
47 | 'icon' => 'fas fa-book-reader',
48 | 'background' => 'bg-success',
49 | 'notifikasi' => 'Selamat kamu berhasil meminjam buku '.$buku->judul_buku .'silahkan ambil buku di perpustakaan',
50 | ]);
51 |
52 | Buku::find($buku->id)->update([
53 | 'jumlah_buku' => $buku->jumlah_buku -1,
54 | 'pinjaman' => $buku->pinjaman +1,
55 | ]);
56 |
57 | Pinjaman::create($data);
58 | $pinjam = Pinjaman::where('email', Auth::guard('anggota')->user()->email)->latest()->first();
59 | return Redirect::route('pinjamberhasil', [Auth::guard('anggota')->user()->email, $pinjam->id])->with([
60 | 'alert' => 'success',
61 | 'title' => 'Pinjaman berhasil dibuat',
62 | ]);
63 | }
64 |
65 | public function pinjamberhasil($email,$id)
66 | {
67 | $pinjam = Pinjaman::with(['buku'])->where(['email' => $email, 'id'=>$id])->first();
68 | if(!$pinjam){
69 | return abort(404);
70 | }
71 |
72 | $title = 'Pinjam Berhasil';
73 | return view('pinjamberhasil', compact('title', 'pinjam'));
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/app/Http/Controllers/SearchController.php:
--------------------------------------------------------------------------------
1 | latest()->get();
15 | $bukupopuler = Buku::with(['kategori'])->where(['status' => 'Publish'])->orderByDesc('views');
16 | $buku = Buku::latest()->filter(request(['kategori','q']))->where(['status' => 'Publish'])->get();
17 | $kategori = Kategori::where(['kategori'=>request('kategori')])->first();
18 | if(request('kategori')){
19 | $buku = Buku::latest()->filter(request(['kategori','q']))->where(['status' => 'Publish', 'kategori_id'=>$kategori->id])->get();
20 | }
21 | return view('search', compact('title','kat', 'bukupopuler', 'buku'));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/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 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
44 | 'throttle:api',
45 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
46 | ],
47 | ];
48 |
49 | /**
50 | * The application's route middleware.
51 | *
52 | * These middleware may be assigned to groups or used individually.
53 | *
54 | * @var array
55 | */
56 | protected $routeMiddleware = [
57 | 'auth' => \App\Http\Middleware\Authenticate::class,
58 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::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 | 'adminrole' => \App\Http\Middleware\AdminRole::class,
67 | 'admin' => \App\Http\Middleware\ManageAdmin::class,
68 | 'anggota' => \App\Http\Middleware\Anggota::class,
69 | 'useranggota' => \App\Http\Middleware\UserMiddleware::class,
70 | ];
71 | }
72 |
--------------------------------------------------------------------------------
/app/Http/Middleware/AdminRole.php:
--------------------------------------------------------------------------------
1 | user()->role != 'Admin'){
20 | return redirect('admin/dashboard');
21 | }
22 | return $next($request);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Anggota.php:
--------------------------------------------------------------------------------
1 | user()){
21 | return redirect('/');
22 | }
23 | return $next($request);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login-admin.index');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | user()){
21 | return redirect('/');
22 | }
23 | return $next($request);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Http/Middleware/PreventRequestsDuringMaintenance.php:
--------------------------------------------------------------------------------
1 | check()) {
26 | return redirect(RouteServiceProvider::HOME);
27 | }
28 | }
29 |
30 | return $next($request);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | user()){
21 | return redirect('/login');
22 | }
23 | return $next($request);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | belongsTo(User::class);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/Models/Aktifitasadmin.php:
--------------------------------------------------------------------------------
1 | blongsTo(User::class);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/Models/Anggota.php:
--------------------------------------------------------------------------------
1 | 'datetime',
24 | ];
25 |
26 | public function scopeFilter($query, array $filter)
27 | {
28 | $query->when($filter['q'] ?? false, function($query, $q){
29 | return $query->where('id_anggota', 'like', '%' .$q. '%')
30 | ->orwhere('nama', 'like', '%' .$q. '%')
31 | ->orwhere('email', 'like', '%' .$q. '%')
32 | ->orwhere('jenis_kelamin', 'like', '%' .$q. '%')
33 | ->orwhere('kelas', 'like', '%' .$q. '%');
34 | });
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/Models/Buku.php:
--------------------------------------------------------------------------------
1 | when($filters['q'] ?? false, function($query, $q){
18 | return $query->where('judul_buku', 'like', '%' . $q . '%')
19 | ->orWhere('pengarang', 'like', '%' . $q . '%')
20 | ->orWhere('penerbit', 'like', '%' . $q . '%')
21 | ->orWhere('deskripsi', 'like', '%' . $q . '%');
22 | })->when($filters['kategori'] ?? false, function($query, $kategori){
23 | return $query->whereHas('kategori', function($query) use ($kategori){
24 | $query->whereKategori($kategori);
25 | });
26 | });
27 | }
28 |
29 | public function kategori()
30 | {
31 | return $this->belongsTo(Kategori::class);
32 | }
33 |
34 | public function pinjaman()
35 | {
36 | return $this->hasMany(Pinjaman::class);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/Models/Kategori.php:
--------------------------------------------------------------------------------
1 | hasMany(Buku::class);
16 | }
17 |
18 | public function scopeFilter($query, array $filters)
19 | {
20 | $query->when($filters['q'] ?? false, function($query, $q){
21 | return $query->where('kategori', 'like', '%' .$q. '%');
22 | });
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/app/Models/Pinjaman.php:
--------------------------------------------------------------------------------
1 | belongsTo(Buku::class);
18 | }
19 |
20 | public function getTglPinjamAttribut()
21 | {
22 | return Carbon::parse($this->attributes['tgl_pinjam'])
23 | ->transalatedFormat('l, d F Y');
24 | }
25 |
26 | public function scopeFilter($query, array $filters)
27 | {
28 | $query->when($filters['pinjam'] ?? false, function($query, $q){
29 | return $query->where('id_anggota', 'like', '%' .$q. '%')
30 | ->orWhere('nama_peminjam', 'like', '%' .$q. '%')
31 | ->orWhere('judul_buku', 'like', '%' .$q. '%')
32 | ->orWhere('email', 'like', '%' .$q. '%')
33 | ->orWhere('jenis_kelamin', 'like', '%' .$q. '%')
34 | ->orWhere('kelas', 'like', '%' .$q. '%')
35 | ->orWhere('tgl_pinjam', 'like', '%' .$q. '%')
36 | ->orWhere('tgl_kembali', 'like', '%' .$q. '%')
37 | ->orWhere('status', 'like', '%' .$q. '%')
38 | ->orWhere('denda', 'like', '%' .$q. '%');
39 | });
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/Models/Thumbnail.php:
--------------------------------------------------------------------------------
1 | 'datetime',
40 | ];
41 |
42 | public function aktifitas()
43 | {
44 | return $this->hasMany(Aktifitas::class);
45 | }
46 |
47 | public function aktifitasadmin()
48 | {
49 | return $this->hasMany(aktifitasadmin::class);
50 | }
51 |
52 | public function scopeFilter($query, array $filters)
53 | {
54 | $query->when($filters['q'] ?? false, function($query, $q){
55 | return $query->where('id_petugas', 'like', '%' .$q. '%')
56 | ->orwhere('nama', 'like', '%' .$q. '%')
57 | ->orwhere('username', 'like', '%' .$q. '%')
58 | ->orwhere('created_at', 'like', '%' .$q. '%');
59 | });
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/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 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | configureRateLimiting();
39 |
40 | $this->routes(function () {
41 | Route::prefix('api')
42 | ->middleware('api')
43 | ->namespace($this->namespace)
44 | ->group(base_path('routes/api.php'));
45 |
46 | Route::middleware('web')
47 | ->namespace($this->namespace)
48 | ->group(base_path('routes/web.php'));
49 | });
50 | }
51 |
52 | /**
53 | * Configure the rate limiters for the application.
54 | *
55 | * @return void
56 | */
57 | protected function configureRateLimiting()
58 | {
59 | RateLimiter::for('api', function (Request $request) {
60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
61 | });
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | 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": ["framework", "laravel"],
6 | "license": "MIT",
7 | "require": {
8 | "php": "^7.3|^8.0",
9 | "barryvdh/laravel-dompdf": "^0.9.0",
10 | "fruitcake/laravel-cors": "^2.0",
11 | "guzzlehttp/guzzle": "^7.0.1",
12 | "itsgoingd/clockwork": "^5.1",
13 | "laravel/framework": "^8.65",
14 | "laravel/sanctum": "^2.11",
15 | "laravel/tinker": "^2.5"
16 | },
17 | "require-dev": {
18 | "facade/ignition": "^2.5",
19 | "fakerphp/faker": "^1.9.1",
20 | "laravel/sail": "^1.0.1",
21 | "mockery/mockery": "^1.4.4",
22 | "nunomaduro/collision": "^5.10",
23 | "phpunit/phpunit": "^9.5.10"
24 | },
25 | "autoload": {
26 | "psr-4": {
27 | "App\\": "app/",
28 | "Database\\Factories\\": "database/factories/",
29 | "Database\\Seeders\\": "database/seeders/"
30 | }
31 | },
32 | "autoload-dev": {
33 | "psr-4": {
34 | "Tests\\": "tests/"
35 | }
36 | },
37 | "scripts": {
38 | "post-autoload-dump": [
39 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
40 | "@php artisan package:discover --ansi"
41 | ],
42 | "post-update-cmd": [
43 | "@php artisan vendor:publish --tag=laravel-assets --ansi"
44 | ],
45 | "post-root-package-install": [
46 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
47 | ],
48 | "post-create-project-cmd": [
49 | "@php artisan key:generate --ansi"
50 | ]
51 | },
52 | "extra": {
53 | "laravel": {
54 | "dont-discover": []
55 | }
56 | },
57 | "config": {
58 | "optimize-autoloader": true,
59 | "preferred-install": "dist",
60 | "sort-packages": true
61 | },
62 | "minimum-stability": "dev",
63 | "prefer-stable": true
64 | }
65 |
--------------------------------------------------------------------------------
/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 | 'ably' => [
45 | 'driver' => 'ably',
46 | 'key' => env('ABLY_KEY'),
47 | ],
48 |
49 | 'redis' => [
50 | 'driver' => 'redis',
51 | 'connection' => 'default',
52 | ],
53 |
54 | 'log' => [
55 | 'driver' => 'log',
56 | ],
57 |
58 | 'null' => [
59 | 'driver' => 'null',
60 | ],
61 |
62 | ],
63 |
64 | ];
65 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Cache Stores
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the cache "stores" for your application as
26 | | well as their drivers. You may even define multiple stores for the
27 | | same cache driver to group types of items stored in your caches.
28 | |
29 | | Supported drivers: "apc", "array", "database", "file",
30 | | "memcached", "redis", "dynamodb", "octane", "null"
31 | |
32 | */
33 |
34 | 'stores' => [
35 |
36 | 'apc' => [
37 | 'driver' => 'apc',
38 | ],
39 |
40 | 'array' => [
41 | 'driver' => 'array',
42 | 'serialize' => false,
43 | ],
44 |
45 | 'database' => [
46 | 'driver' => 'database',
47 | 'table' => 'cache',
48 | 'connection' => null,
49 | 'lock_connection' => null,
50 | ],
51 |
52 | 'file' => [
53 | 'driver' => 'file',
54 | 'path' => storage_path('framework/cache/data'),
55 | ],
56 |
57 | 'memcached' => [
58 | 'driver' => 'memcached',
59 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
60 | 'sasl' => [
61 | env('MEMCACHED_USERNAME'),
62 | env('MEMCACHED_PASSWORD'),
63 | ],
64 | 'options' => [
65 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
66 | ],
67 | 'servers' => [
68 | [
69 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
70 | 'port' => env('MEMCACHED_PORT', 11211),
71 | 'weight' => 100,
72 | ],
73 | ],
74 | ],
75 |
76 | 'redis' => [
77 | 'driver' => 'redis',
78 | 'connection' => 'cache',
79 | 'lock_connection' => 'default',
80 | ],
81 |
82 | 'dynamodb' => [
83 | 'driver' => 'dynamodb',
84 | 'key' => env('AWS_ACCESS_KEY_ID'),
85 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
86 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
87 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
88 | 'endpoint' => env('DYNAMODB_ENDPOINT'),
89 | ],
90 |
91 | 'octane' => [
92 | 'driver' => 'octane',
93 | ],
94 |
95 | ],
96 |
97 | /*
98 | |--------------------------------------------------------------------------
99 | | Cache Key Prefix
100 | |--------------------------------------------------------------------------
101 | |
102 | | When utilizing a RAM based store such as APC or Memcached, there might
103 | | be other applications utilizing the same cache. So, we'll specify a
104 | | value to get prefixed to all our keys so we can avoid collisions.
105 | |
106 | */
107 |
108 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
109 |
110 | ];
111 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*', 'sanctum/csrf-cookie'],
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 | | Filesystem Disks
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure as many filesystem "disks" as you wish, and you
24 | | may even configure multiple disks of the same driver. Defaults have
25 | | been setup for each driver as an example of the required options.
26 | |
27 | | Supported Drivers: "local", "ftp", "sftp", "s3"
28 | |
29 | */
30 |
31 | 'disks' => [
32 |
33 | 'local' => [
34 | 'driver' => 'local',
35 | 'root' => storage_path('app'),
36 | ],
37 |
38 | 'public' => [
39 | 'driver' => 'local',
40 | 'root' => storage_path('app/public'),
41 | 'url' => env('APP_URL').'/storage',
42 | 'visibility' => 'public',
43 | ],
44 |
45 | 's3' => [
46 | 'driver' => 's3',
47 | 'key' => env('AWS_ACCESS_KEY_ID'),
48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
49 | 'region' => env('AWS_DEFAULT_REGION'),
50 | 'bucket' => env('AWS_BUCKET'),
51 | 'url' => env('AWS_URL'),
52 | 'endpoint' => env('AWS_ENDPOINT'),
53 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
54 | ],
55 |
56 | ],
57 |
58 | /*
59 | |--------------------------------------------------------------------------
60 | | Symbolic Links
61 | |--------------------------------------------------------------------------
62 | |
63 | | Here you may configure the symbolic links that will be created when the
64 | | `storage:link` Artisan command is executed. The array keys should be
65 | | the locations of the links and the values should be their targets.
66 | |
67 | */
68 |
69 | 'links' => [
70 | public_path('storage') => storage_path('app/public'),
71 | ],
72 |
73 | ];
74 |
--------------------------------------------------------------------------------
/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/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 | 'after_commit' => false,
43 | ],
44 |
45 | 'beanstalkd' => [
46 | 'driver' => 'beanstalkd',
47 | 'host' => 'localhost',
48 | 'queue' => 'default',
49 | 'retry_after' => 90,
50 | 'block_for' => 0,
51 | 'after_commit' => false,
52 | ],
53 |
54 | 'sqs' => [
55 | 'driver' => 'sqs',
56 | 'key' => env('AWS_ACCESS_KEY_ID'),
57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
59 | 'queue' => env('SQS_QUEUE', 'default'),
60 | 'suffix' => env('SQS_SUFFIX'),
61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
62 | 'after_commit' => false,
63 | ],
64 |
65 | 'redis' => [
66 | 'driver' => 'redis',
67 | 'connection' => 'default',
68 | 'queue' => env('REDIS_QUEUE', 'default'),
69 | 'retry_after' => 90,
70 | 'block_for' => null,
71 | 'after_commit' => false,
72 | ],
73 |
74 | ],
75 |
76 | /*
77 | |--------------------------------------------------------------------------
78 | | Failed Queue Jobs
79 | |--------------------------------------------------------------------------
80 | |
81 | | These options configure the behavior of failed queue job logging so you
82 | | can control which database and table are used to store the jobs that
83 | | have failed. You may change them to any database / table you wish.
84 | |
85 | */
86 |
87 | 'failed' => [
88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
89 | 'database' => env('DB_CONNECTION', 'mysql'),
90 | 'table' => 'failed_jobs',
91 | ],
92 |
93 | ];
94 |
--------------------------------------------------------------------------------
/config/sanctum.php:
--------------------------------------------------------------------------------
1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
17 | '%s%s',
18 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
19 | env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : ''
20 | ))),
21 |
22 | /*
23 | |--------------------------------------------------------------------------
24 | | Expiration Minutes
25 | |--------------------------------------------------------------------------
26 | |
27 | | This value controls the number of minutes until an issued token will be
28 | | considered expired. If this value is null, personal access tokens do
29 | | not expire. This won't tweak the lifetime of first-party sessions.
30 | |
31 | */
32 |
33 | 'expiration' => null,
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Sanctum Middleware
38 | |--------------------------------------------------------------------------
39 | |
40 | | When authenticating your first-party SPA with Sanctum you may need to
41 | | customize some of the middleware Sanctum uses while processing the
42 | | request. You may change the middleware listed below as required.
43 | |
44 | */
45 |
46 | 'middleware' => [
47 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
48 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
49 | ],
50 |
51 | ];
52 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/database/factories/BukuFactory.php:
--------------------------------------------------------------------------------
1 | $this->faker->name(),
19 | 'slug' => $this->faker->slug(1),
20 | 'pengarang' => 'Saya suka kamu',
21 | 'jumlah_buku' => '100',
22 | 'deskripsi' => $this->faker->text(),
23 | 'tahun_terbit' => '2021',
24 | 'penerbit' => 'Saya suka kamu',
25 | 'isbn' => '12345678',
26 | 'kategori_id' => $this->faker->numberBetween(1, 3),
27 | 'gambar_buku' => 'gambar.jpg',
28 | 'views' => $this->faker->numberBetween(0, 100)
29 | ];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | $this->faker->name(),
19 | 'pengarang' => $this->faker->name(),
20 | 'jumlah_buku' => '100',
21 | 'deskripsi' => $this->faker->words(),
22 | 'tahun_terbit' => '2021',
23 | 'penerbit' => $this->faker->name(),
24 | 'isbn' => '12345678',
25 | 'kategori' => 'pendidikan',
26 | 'gambar_buku' => 'gambar.jpg',
27 | 'views' => $this->faker->numberBetween(0, 100)
28 | ];
29 | }
30 |
31 | /**
32 | * Indicate that the model's email address should be unverified.
33 | *
34 | * @return \Illuminate\Database\Eloquent\Factories\Factory
35 | */
36 | public function unverified()
37 | {
38 | return $this->state(function (array $attributes) {
39 | return [
40 | 'email_verified_at' => null,
41 | ];
42 | });
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('id_petugas')->nullable();
19 | $table->string('nama');
20 | $table->string('username')->unique();
21 | $table->string('password');
22 | $table->enum('role', ['Admin', 'Petugas'])->default('Petugas');
23 | $table->string('aktifitas')->nullable();
24 | $table->timestamps();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | *
31 | * @return void
32 | */
33 | public function down()
34 | {
35 | Schema::dropIfExists('users');
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/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->string('uuid')->unique();
19 | $table->text('connection');
20 | $table->text('queue');
21 | $table->longText('payload');
22 | $table->longText('exception');
23 | $table->timestamp('failed_at')->useCurrent();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('failed_jobs');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->morphs('tokenable');
19 | $table->string('name');
20 | $table->string('token', 64)->unique();
21 | $table->text('abilities')->nullable();
22 | $table->timestamp('last_used_at')->nullable();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('personal_access_tokens');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_14_072950_create_bukus_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('judul_buku');
19 | $table->string('slug');
20 | $table->string('pengarang');
21 | $table->integer('jumlah_buku');
22 | $table->text('deskripsi');
23 | $table->integer('tahun_terbit');
24 | $table->string('penerbit');
25 | $table->string('isbn')->nullable();
26 | $table->foreignId('kategori_id');
27 | $table->string('gambar_buku');
28 | $table->integer('views')->default('0')->nullable();
29 | $table->foreignId('pinjaman')->default('0')->nullable();
30 | $table->enum('status', ['Publish', 'Draft', 'Pending'])->default('Publish');
31 | $table->timestamps();
32 | });
33 | }
34 |
35 | /**
36 | * Reverse the migrations.
37 | *
38 | * @return void
39 | */
40 | public function down()
41 | {
42 | Schema::dropIfExists('bukus');
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_14_102731_create_kategoris_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('kategori');
19 | $table->timestamps();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('kategoris');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_15_165432_create_thumbnails_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('gambar');
19 | $table->string('link')->nullable();
20 | $table->timestamps();
21 | });
22 | }
23 |
24 | /**
25 | * Reverse the migrations.
26 | *
27 | * @return void
28 | */
29 | public function down()
30 | {
31 | Schema::dropIfExists('thumbnails');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_16_131706_create_anggotas_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('id_anggota');
19 | $table->string('foto');
20 | $table->string('nama');
21 | $table->string('email')->unique();
22 | $table->string('kelas');
23 | $table->enum('jenis_kelamin',['Laki-laki', 'Perempuan']);
24 | $table->integer('nis');
25 | $table->string('password');
26 | $table->enum('status', ['Nonaktif', 'Verify', 'Aktif'])->default('Nonaktif');
27 | $table->string('aktifitas')->nullable();
28 | $table->timestamp('email_verified_at')->nullable();
29 | $table->rememberToken();
30 | $table->timestamps();
31 | });
32 | }
33 | /**
34 | * Reverse the migrations.
35 | *
36 | * @return void
37 | */
38 | public function down()
39 | {
40 | Schema::dropIfExists('anggotas');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_18_155808_create_pinjamen_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('id_anggota');
19 | $table->string('nama_peminjam');
20 | $table->string('email');
21 | $table->string('jenis_kelamin');
22 | $table->string('kelas');
23 | $table->string('judul_buku');
24 | $table->foreignId('buku_id');
25 | $table->string('tgl_pinjam');
26 | $table->string('tgl_kembali');
27 | $table->enum('status',['Belum diambil','Dipinjam','Dikembalikan','Denda'])->default('Belum diambil');
28 | $table->integer('denda')->default('0');
29 | $table->timestamps();
30 | });
31 | }
32 |
33 | /**
34 | * Reverse the migrations.
35 | *
36 | * @return void
37 | */
38 | public function down()
39 | {
40 | Schema::dropIfExists('pinjamen');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_20_102837_create_aktifitas_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->foreignId('user_id');
19 | $table->string('icon');
20 | $table->string('backgroud');
21 | $table->string('notifikasi');
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('aktifitas');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/migrations/2021_11_21_091528_create_aktifitasadmins_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->foreignId('user_id');
19 | $table->string('icon');
20 | $table->string('backgroud');
21 | $table->string('notifikasi');
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('aktifitasadmins');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | create();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "requires": true,
3 | "lockfileVersion": 1,
4 | "dependencies": {
5 | "stisla-theme": {
6 | "version": "1.0.6",
7 | "resolved": "https://registry.npmjs.org/stisla-theme/-/stisla-theme-1.0.6.tgz",
8 | "integrity": "sha512-ccMXkEJ/u98db5Kp5Ubb1IIM0AArZu2hTznOrau2WCdoqPjR5wBvZevCVosSffN2OajhwwN2GkQ5e1LkD9y50w=="
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "mix",
6 | "watch": "mix watch",
7 | "watch-poll": "mix watch -- --watch-options-poll=1000",
8 | "hot": "mix watch --hot",
9 | "prod": "npm run production",
10 | "production": "mix --production"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.21",
14 | "laravel-mix": "^6.0.6",
15 | "lodash": "^4.17.19",
16 | "postcss": "^8.1.14"
17 | },
18 | "dependencies": {
19 | "stisla-theme": "^1.0.6"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
No | 34 |Id Anggota | 35 |Nama | 36 |Jenis Kelamin | 38 |Kelas | 39 |Judul Buku | 40 |Tanggal Pinjam | 41 |Tanggal Kembali | 42 |Status | 43 |Denda | 44 ||
---|---|---|---|---|---|---|---|---|---|---|
{{ $no++ }} | 51 |{{ $tr->id_anggota }} | 52 |{{ $tr->nama_peminjam }} | 53 |{{ $tr->kelas }} | 54 |{{ $tr->jenis_kelamin }} | 55 |{{ $tr->kelas }} | 56 |{{ $tr->judul_buku }} | 57 |{{ date('d F Y', strtotime($tr->tgl_pinjam )) }} | 58 |{{ date('d F Y', strtotime($tr->tgl_kembali )) }} | 59 |{{ $tr->status }} | 60 |{{ $tr->denda }} | 61 |
Nama | 61 |: | 62 |{{ $pinjaman->nama_peminjam }} | 63 |
: | 67 |{{ $pinjaman->email}} | 68 ||
Kelas | 71 |: | 72 |{{ $pinjaman->kelas }} | 73 |
Judul Buku | 76 |: | 77 |{{ $pinjaman->judul_buku }} | 78 |
Tanggal Peminjaman | 81 |: | 82 |{{ date('d F Y', strtotime($pinjaman->tgl_pinjam)) }} | 83 |
Tanggal Pengembalian | 86 |: | 87 |{{ date('d F Y', strtotime($pinjaman->tgl_kembali)) }} | 88 |
dicetak oleh E-Perpus SMKN 1 Ciamis
96 |