Proyek Tugas Akhir
This commit is contained in:
commit
2f8810b526
|
|
@ -0,0 +1,18 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[docker-compose.yml]
|
||||||
|
indent_size = 4
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
APP_LOCALE=en
|
||||||
|
APP_FALLBACK_LOCALE=en
|
||||||
|
APP_FAKER_LOCALE=en_US
|
||||||
|
|
||||||
|
APP_MAINTENANCE_DRIVER=file
|
||||||
|
# APP_MAINTENANCE_STORE=database
|
||||||
|
|
||||||
|
PHP_CLI_SERVER_WORKERS=4
|
||||||
|
|
||||||
|
BCRYPT_ROUNDS=12
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
LOG_STACK=single
|
||||||
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
|
DB_CONNECTION=sqlite
|
||||||
|
# DB_HOST=127.0.0.1
|
||||||
|
# DB_PORT=3306
|
||||||
|
# DB_DATABASE=laravel
|
||||||
|
# DB_USERNAME=root
|
||||||
|
# DB_PASSWORD=
|
||||||
|
|
||||||
|
SESSION_DRIVER=database
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
SESSION_ENCRYPT=false
|
||||||
|
SESSION_PATH=/
|
||||||
|
SESSION_DOMAIN=null
|
||||||
|
|
||||||
|
BROADCAST_CONNECTION=log
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
QUEUE_CONNECTION=database
|
||||||
|
|
||||||
|
CACHE_STORE=database
|
||||||
|
# CACHE_PREFIX=
|
||||||
|
|
||||||
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|
||||||
|
REDIS_CLIENT=phpredis
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_MAILER=log
|
||||||
|
MAIL_SCHEME=null
|
||||||
|
MAIL_HOST=127.0.0.1
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
* text=auto eol=lf
|
||||||
|
|
||||||
|
*.blade.php diff=html
|
||||||
|
*.css diff=css
|
||||||
|
*.html diff=html
|
||||||
|
*.md diff=markdown
|
||||||
|
*.php diff=php
|
||||||
|
|
||||||
|
/.github export-ignore
|
||||||
|
CHANGELOG.md export-ignore
|
||||||
|
.styleci.yml export-ignore
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
/.phpunit.cache
|
||||||
|
/node_modules
|
||||||
|
/public/build
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
|
/storage/pail
|
||||||
|
/vendor
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.env.production
|
||||||
|
.phpactor.json
|
||||||
|
.phpunit.result.cache
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
/auth.json
|
||||||
|
/.fleet
|
||||||
|
/.idea
|
||||||
|
/.nova
|
||||||
|
/.vscode
|
||||||
|
/.zed
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
|
||||||
|
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
||||||
|
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
||||||
|
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## About Laravel
|
||||||
|
|
||||||
|
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||||
|
|
||||||
|
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||||
|
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||||
|
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||||
|
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||||
|
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||||
|
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||||
|
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||||
|
|
||||||
|
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||||
|
|
||||||
|
## Learning Laravel
|
||||||
|
|
||||||
|
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||||
|
|
||||||
|
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
|
||||||
|
|
||||||
|
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||||
|
|
||||||
|
## Laravel Sponsors
|
||||||
|
|
||||||
|
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
|
||||||
|
|
||||||
|
### Premium Partners
|
||||||
|
|
||||||
|
- **[Vehikl](https://vehikl.com/)**
|
||||||
|
- **[Tighten Co.](https://tighten.co)**
|
||||||
|
- **[WebReinvent](https://webreinvent.com/)**
|
||||||
|
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||||
|
- **[64 Robots](https://64robots.com)**
|
||||||
|
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
|
||||||
|
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||||
|
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
|
||||||
|
- **[Jump24](https://jump24.co.uk)**
|
||||||
|
- **[Redberry](https://redberry.international/laravel/)**
|
||||||
|
- **[Active Logic](https://activelogic.com)**
|
||||||
|
- **[byte5](https://byte5.de)**
|
||||||
|
- **[OP.GG](https://op.gg)**
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||||
|
|
||||||
|
## Security Vulnerabilities
|
||||||
|
|
||||||
|
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests\Auth\LoginRequest;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class AuthenticatedSessionController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the login view.
|
||||||
|
*/
|
||||||
|
public function create(): View
|
||||||
|
{
|
||||||
|
return view('auth.login');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming authentication request.
|
||||||
|
*/
|
||||||
|
public function store(LoginRequest $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$request->authenticate();
|
||||||
|
$request->session()->regenerate();
|
||||||
|
|
||||||
|
// Ganti dari redirect()->intended(RouteServiceProvider::HOME)
|
||||||
|
// menjadi:
|
||||||
|
return redirect()->intended(route('klasifikasi'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroy an authenticated session.
|
||||||
|
*/
|
||||||
|
public function destroy(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
Auth::guard('web')->logout();
|
||||||
|
|
||||||
|
$request->session()->invalidate();
|
||||||
|
|
||||||
|
$request->session()->regenerateToken();
|
||||||
|
|
||||||
|
return redirect('/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class ConfirmablePasswordController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Show the confirm password view.
|
||||||
|
*/
|
||||||
|
public function show(): View
|
||||||
|
{
|
||||||
|
return view('auth.confirm-password');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirm the user's password.
|
||||||
|
*/
|
||||||
|
public function store(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
if (! Auth::guard('web')->validate([
|
||||||
|
'email' => $request->user()->email,
|
||||||
|
'password' => $request->password,
|
||||||
|
])) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'password' => __('auth.password'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->session()->put('auth.password_confirmed_at', time());
|
||||||
|
|
||||||
|
return redirect()->intended(route('dashboard', absolute: false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
|
||||||
|
class DirectPasswordResetController extends Controller
|
||||||
|
{
|
||||||
|
// Langkah 1: Tampil form input email
|
||||||
|
public function showEmailForm()
|
||||||
|
{
|
||||||
|
return view('auth.forgot-password');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Langkah 2: Cek email, kalau ada redirect ke form ganti password
|
||||||
|
public function checkEmail(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'email' => ['required', 'email']
|
||||||
|
], [
|
||||||
|
'email.required' => 'Email wajib diisi.',
|
||||||
|
'email.email' => 'Format email tidak valid.'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = User::where('email', $request->email)->first();
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
return back()->withErrors([
|
||||||
|
'email' => 'Email tidak ditemukan dalam sistem.'
|
||||||
|
])->withInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Simpan email ke session, redirect ke form password baru
|
||||||
|
session(['reset_email' => $request->email]);
|
||||||
|
return redirect()->route('password.direct.form');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Langkah 3: Tampil form password baru
|
||||||
|
public function showResetForm()
|
||||||
|
{
|
||||||
|
if (!session('reset_email')) {
|
||||||
|
return redirect()->route('password.request')
|
||||||
|
->withErrors(['email' => 'Sesi tidak valid, silakan ulangi.']);
|
||||||
|
}
|
||||||
|
return view('auth.reset-password-direct');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Langkah 4: Simpan password baru
|
||||||
|
public function resetPassword(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'password' => ['required', 'confirmed', 'min:8']
|
||||||
|
], [
|
||||||
|
'password.required' => 'Password wajib diisi.',
|
||||||
|
'password.confirmed' => 'Konfirmasi password tidak cocok.',
|
||||||
|
'password.min' => 'Password minimal 8 karakter.'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$email = session('reset_email');
|
||||||
|
|
||||||
|
if (!$email) {
|
||||||
|
return redirect()->route('password.request')
|
||||||
|
->withErrors(['email' => 'Sesi tidak valid, silakan ulangi.']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = User::where('email', $email)->first();
|
||||||
|
|
||||||
|
if (!$user) {
|
||||||
|
return redirect()->route('password.request')
|
||||||
|
->withErrors(['email' => 'User tidak ditemukan.']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user->password = Hash::make($request->password);
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
// Hapus session
|
||||||
|
session()->forget('reset_email');
|
||||||
|
|
||||||
|
return redirect()->route('login')
|
||||||
|
->with('status', 'Password berhasil diubah! Silakan masuk dengan password baru.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class EmailVerificationNotificationController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Send a new email verification notification.
|
||||||
|
*/
|
||||||
|
public function store(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
if ($request->user()->hasVerifiedEmail()) {
|
||||||
|
return redirect()->intended(route('dashboard', absolute: false));
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->user()->sendEmailVerificationNotification();
|
||||||
|
|
||||||
|
return back()->with('status', 'verification-link-sent');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class EmailVerificationPromptController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the email verification prompt.
|
||||||
|
*/
|
||||||
|
public function __invoke(Request $request): RedirectResponse|View
|
||||||
|
{
|
||||||
|
return $request->user()->hasVerifiedEmail()
|
||||||
|
? redirect()->intended(route('dashboard', absolute: false))
|
||||||
|
: view('auth.verify-email');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Auth\Events\PasswordReset;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Facades\Password;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Illuminate\Validation\Rules;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class NewPasswordController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the password reset view.
|
||||||
|
*/
|
||||||
|
public function create(Request $request): View
|
||||||
|
{
|
||||||
|
return view('auth.reset-password', ['request' => $request]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming new password request.
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function store(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'token' => ['required'],
|
||||||
|
'email' => ['required', 'email'],
|
||||||
|
'password' => ['required', 'confirmed', Rules\Password::defaults()],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Here we will attempt to reset the user's password. If it is successful we
|
||||||
|
// will update the password on an actual user model and persist it to the
|
||||||
|
// database. Otherwise we will parse the error and return the response.
|
||||||
|
$status = Password::reset(
|
||||||
|
$request->only('email', 'password', 'password_confirmation', 'token'),
|
||||||
|
function (User $user) use ($request) {
|
||||||
|
$user->forceFill([
|
||||||
|
'password' => Hash::make($request->password),
|
||||||
|
'remember_token' => Str::random(60),
|
||||||
|
])->save();
|
||||||
|
|
||||||
|
event(new PasswordReset($user));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// If the password was successfully reset, we will redirect the user back to
|
||||||
|
// the application's home authenticated view. If there is an error we can
|
||||||
|
// redirect them back to where they came from with their error message.
|
||||||
|
return $status == Password::PASSWORD_RESET
|
||||||
|
? redirect()->route('login')->with('status', __($status))
|
||||||
|
: back()->withInput($request->only('email'))
|
||||||
|
->withErrors(['email' => __($status)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Validation\Rules\Password;
|
||||||
|
|
||||||
|
class PasswordController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Update the user's password.
|
||||||
|
*/
|
||||||
|
public function update(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$validated = $request->validateWithBag('updatePassword', [
|
||||||
|
'current_password' => ['required', 'current_password'],
|
||||||
|
'password' => ['required', Password::defaults(), 'confirmed'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$request->user()->update([
|
||||||
|
'password' => Hash::make($validated['password']),
|
||||||
|
]);
|
||||||
|
|
||||||
|
return back()->with('status', 'password-updated');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Password;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class PasswordResetLinkController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the password reset link request view.
|
||||||
|
*/
|
||||||
|
public function create(): View
|
||||||
|
{
|
||||||
|
return view('auth.forgot-password');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming password reset link request.
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function store(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'email' => ['required', 'email'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
// We will send the password reset link to this user. Once we have attempted
|
||||||
|
// to send the link, we will examine the response then see the message we
|
||||||
|
// need to show to the user. Finally, we'll send out a proper response.
|
||||||
|
$status = Password::sendResetLink(
|
||||||
|
$request->only('email')
|
||||||
|
);
|
||||||
|
|
||||||
|
return $status == Password::RESET_LINK_SENT
|
||||||
|
? back()->with('status', __($status))
|
||||||
|
: back()->withInput($request->only('email'))
|
||||||
|
->withErrors(['email' => __($status)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Validation\Rules;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class RegisteredUserController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the registration view.
|
||||||
|
*/
|
||||||
|
public function create(): View
|
||||||
|
{
|
||||||
|
return view('auth.register');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle an incoming registration request.
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function store(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'name' => ['required', 'string', 'max:255'],
|
||||||
|
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:'.User::class],
|
||||||
|
'password' => ['required', 'confirmed', Rules\Password::defaults()],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = User::create([
|
||||||
|
'name' => $request->name,
|
||||||
|
'email' => $request->email,
|
||||||
|
'password' => Hash::make($request->password),
|
||||||
|
]);
|
||||||
|
|
||||||
|
event(new Registered($user));
|
||||||
|
|
||||||
|
Auth::login($user);
|
||||||
|
|
||||||
|
return redirect(route('klasifikasi', absolute: false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Auth\Events\Verified;
|
||||||
|
use Illuminate\Foundation\Auth\EmailVerificationRequest;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
|
||||||
|
class VerifyEmailController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Mark the authenticated user's email address as verified.
|
||||||
|
*/
|
||||||
|
public function __invoke(EmailVerificationRequest $request): RedirectResponse
|
||||||
|
{
|
||||||
|
if ($request->user()->hasVerifiedEmail()) {
|
||||||
|
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->user()->markEmailAsVerified()) {
|
||||||
|
event(new Verified($request->user()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->intended(route('dashboard', absolute: false).'?verified=1');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
// use App\Models\Classification; // -> Dihapus karena tidak butuh simpan riwayat lagi
|
||||||
|
use App\Models\Image;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
|
class ClassificationController extends Controller
|
||||||
|
{
|
||||||
|
public function classify($image_id)
|
||||||
|
{
|
||||||
|
// 1. Ambil gambar yang baru saja diupload
|
||||||
|
$image = Image::findOrFail($image_id);
|
||||||
|
|
||||||
|
// 2. Path gambar di storage
|
||||||
|
$path = storage_path('app/public/' . $image->image_path);
|
||||||
|
|
||||||
|
// 3. Kirim gambar ke API Python
|
||||||
|
$response = Http::attach(
|
||||||
|
'image',
|
||||||
|
file_get_contents($path),
|
||||||
|
basename($path)
|
||||||
|
)->post('http://127.0.0.1:5000/predict');
|
||||||
|
|
||||||
|
$result = $response->json();
|
||||||
|
|
||||||
|
// KODE SIMPAN KE DATABASE (Classification::create) SUDAH DIHAPUS DI SINI
|
||||||
|
|
||||||
|
// 4. Langsung kembalikan hasil ke halaman view (blade)
|
||||||
|
// Gunakan ->with('result', $result) agar datanya bisa ditampilkan di frontend
|
||||||
|
return redirect()->back()->with('success', 'Klasifikasi berhasil')->with('result', $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
abstract class Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use App\Models\Image;
|
||||||
|
|
||||||
|
class HistoryController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$histories = Image::with('classification')
|
||||||
|
->where('user_id', Auth::id())
|
||||||
|
->whereNotNull('user_id')
|
||||||
|
->whereHas('classification')
|
||||||
|
->latest()
|
||||||
|
->paginate(10);
|
||||||
|
|
||||||
|
return view('history.history', compact('histories'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\Image;
|
||||||
|
use App\Models\Classification;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
|
class ImageController extends Controller
|
||||||
|
{
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('klasifikasi.klasifikasi');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'image' => 'required|image|mimes:jpg,jpeg,png|max:2048'
|
||||||
|
], [
|
||||||
|
'image.required' => 'Gambar insang ikan wajib diunggah.',
|
||||||
|
'image.image' => 'File harus berupa gambar.',
|
||||||
|
'image.mimes' => 'Format yang diizinkan hanya JPG, JPEG, atau PNG.',
|
||||||
|
'image.max' => 'Ukuran gambar maksimal 2MB.'
|
||||||
|
]);
|
||||||
|
|
||||||
|
// ======================================
|
||||||
|
// HAPUS FOTO LAMA — hanya untuk guest
|
||||||
|
// ======================================
|
||||||
|
if (!Auth::check()) {
|
||||||
|
$fotoGuest = Image::whereNull('user_id')->get();
|
||||||
|
foreach ($fotoGuest as $fotoLama) {
|
||||||
|
\Storage::delete('public/' . $fotoLama->image_path);
|
||||||
|
$fotoLama->delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Simpan gambar baru
|
||||||
|
$imageFile = $request->file('image');
|
||||||
|
$path = $imageFile->store('images', 'public');
|
||||||
|
|
||||||
|
// =============================================
|
||||||
|
// Simpan user_id kalau login, null kalau guest
|
||||||
|
// =============================================
|
||||||
|
$image = Image::create([
|
||||||
|
'user_id' => Auth::id(), // otomatis null kalau belum login
|
||||||
|
'image_path' => $path
|
||||||
|
]);
|
||||||
|
|
||||||
|
$image_url = asset('storage/' . $path);
|
||||||
|
|
||||||
|
// ==========================================
|
||||||
|
// KONEKSI KE API PYTHON (FLASK)
|
||||||
|
// ==========================================
|
||||||
|
try {
|
||||||
|
$apiUrl = 'http://127.0.0.1:5000/predict';
|
||||||
|
|
||||||
|
$response = Http::timeout(60)->attach(
|
||||||
|
'image',
|
||||||
|
file_get_contents($imageFile->getRealPath()),
|
||||||
|
$imageFile->getClientOriginalName()
|
||||||
|
)->post($apiUrl);
|
||||||
|
|
||||||
|
if ($response->successful()) {
|
||||||
|
|
||||||
|
$result = $response->json();
|
||||||
|
|
||||||
|
// BUKAN INSANG
|
||||||
|
if ($result['status'] == 'bukan_insang') {
|
||||||
|
return redirect()->back()->with([
|
||||||
|
'error_insang' => $result['pesan'],
|
||||||
|
'image_url' => $image_url
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// HASIL NORMAL
|
||||||
|
if ($result['status'] == 'ok') {
|
||||||
|
Classification::create([
|
||||||
|
'image_id' => $image->id,
|
||||||
|
'kelas' => $result['prediksi_2kelas'],
|
||||||
|
'prob_fresh' => $result['prob_fresh'],
|
||||||
|
'tingkat_kesegaran' => $result['tingkat_kesegaran']
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->back()->with([
|
||||||
|
'success' => 'Gambar berhasil dianalisis oleh model AI!',
|
||||||
|
'kelas' => $result['prediksi_2kelas'],
|
||||||
|
'prob_fresh' => $result['prob_fresh'],
|
||||||
|
'tingkat_kesegaran' => $result['tingkat_kesegaran'],
|
||||||
|
'image_url' => $image_url,
|
||||||
|
'cropped_image' => $result['cropped_image'] ?? null
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return redirect()->back()->withErrors([
|
||||||
|
'image' => 'Terjadi kesalahan pada API: ' . $response->body()
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return redirect()->back()->withErrors([
|
||||||
|
'image' => 'Gagal terhubung ke server AI (Flask).'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function history()
|
||||||
|
{
|
||||||
|
$histories = Image::where('user_id', Auth::id())
|
||||||
|
->with('classification')
|
||||||
|
->latest()
|
||||||
|
->paginate(10);
|
||||||
|
|
||||||
|
return view('history.history', compact('histories'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Requests\ProfileUpdateRequest;
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Redirect;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class ProfileController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display the user's profile form.
|
||||||
|
*/
|
||||||
|
public function edit(Request $request): View
|
||||||
|
{
|
||||||
|
return view('profile.edit', [
|
||||||
|
'user' => $request->user(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the user's profile information.
|
||||||
|
*/
|
||||||
|
public function update(ProfileUpdateRequest $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$request->user()->fill($request->validated());
|
||||||
|
|
||||||
|
if ($request->user()->isDirty('email')) {
|
||||||
|
$request->user()->email_verified_at = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->user()->save();
|
||||||
|
|
||||||
|
return Redirect::route('profile.edit')->with('status', 'profile-updated');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the user's account.
|
||||||
|
*/
|
||||||
|
public function destroy(Request $request): RedirectResponse
|
||||||
|
{
|
||||||
|
$request->validateWithBag('userDeletion', [
|
||||||
|
'password' => ['required', 'current_password'],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = $request->user();
|
||||||
|
|
||||||
|
Auth::logout();
|
||||||
|
|
||||||
|
$user->delete();
|
||||||
|
|
||||||
|
$request->session()->invalidate();
|
||||||
|
$request->session()->regenerateToken();
|
||||||
|
|
||||||
|
return Redirect::to('/');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Auth;
|
||||||
|
|
||||||
|
use Illuminate\Auth\Events\Lockout;
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
|
|
||||||
|
class LoginRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'email' => ['required', 'string', 'email'],
|
||||||
|
'password' => ['required', 'string'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempt to authenticate the request's credentials.
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function authenticate(): void
|
||||||
|
{
|
||||||
|
$this->ensureIsNotRateLimited();
|
||||||
|
|
||||||
|
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
||||||
|
RateLimiter::hit($this->throttleKey());
|
||||||
|
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'email' => trans('auth.failed'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
RateLimiter::clear($this->throttleKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ensure the login request is not rate limited.
|
||||||
|
*
|
||||||
|
* @throws \Illuminate\Validation\ValidationException
|
||||||
|
*/
|
||||||
|
public function ensureIsNotRateLimited(): void
|
||||||
|
{
|
||||||
|
if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
event(new Lockout($this));
|
||||||
|
|
||||||
|
$seconds = RateLimiter::availableIn($this->throttleKey());
|
||||||
|
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'email' => trans('auth.throttle', [
|
||||||
|
'seconds' => $seconds,
|
||||||
|
'minutes' => ceil($seconds / 60),
|
||||||
|
]),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the rate limiting throttle key for the request.
|
||||||
|
*/
|
||||||
|
public function throttleKey(): string
|
||||||
|
{
|
||||||
|
return Str::transliterate(Str::lower($this->string('email')).'|'.$this->ip());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
|
class ProfileUpdateRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => ['required', 'string', 'max:255'],
|
||||||
|
'email' => [
|
||||||
|
'required',
|
||||||
|
'string',
|
||||||
|
'lowercase',
|
||||||
|
'email',
|
||||||
|
'max:255',
|
||||||
|
Rule::unique(User::class)->ignore($this->user()->id),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Classification extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'image_id',
|
||||||
|
'kelas',
|
||||||
|
'prob_fresh',
|
||||||
|
'tingkat_kesegaran'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function image()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Image::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Image extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'user_id',
|
||||||
|
'image_path'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(User::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function classification()
|
||||||
|
{
|
||||||
|
return $this->hasOne(Classification::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Prediction extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'image_id',
|
||||||
|
'kelas_model',
|
||||||
|
'prob_fresh',
|
||||||
|
'tingkat_kesegaran'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function image()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Image::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
|
||||||
|
class User extends Authenticatable
|
||||||
|
{
|
||||||
|
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||||
|
use HasFactory, Notifiable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be hidden for serialization.
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'password',
|
||||||
|
'remember_token',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attributes that should be cast.
|
||||||
|
*
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'email_verified_at' => 'datetime',
|
||||||
|
'password' => 'hashed',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*/
|
||||||
|
public function register(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components;
|
||||||
|
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class AppLayout extends Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the view / contents that represents the component.
|
||||||
|
*/
|
||||||
|
public function render(): View
|
||||||
|
{
|
||||||
|
return view('layouts.app');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\View\Components;
|
||||||
|
|
||||||
|
use Illuminate\View\Component;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class GuestLayout extends Component
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the view / contents that represents the component.
|
||||||
|
*/
|
||||||
|
public function render(): View
|
||||||
|
{
|
||||||
|
return view('layouts.guest');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Application;
|
||||||
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
// Register the Composer autoloader...
|
||||||
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
// Bootstrap Laravel and handle the command...
|
||||||
|
/** @var Application $app */
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
$status = $app->handleCommand(new ArgvInput);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Application;
|
||||||
|
use Illuminate\Foundation\Configuration\Exceptions;
|
||||||
|
use Illuminate\Foundation\Configuration\Middleware;
|
||||||
|
|
||||||
|
return Application::configure(basePath: dirname(__DIR__))
|
||||||
|
->withRouting(
|
||||||
|
web: __DIR__.'/../routes/web.php',
|
||||||
|
commands: __DIR__.'/../routes/console.php',
|
||||||
|
health: '/up',
|
||||||
|
)
|
||||||
|
->withMiddleware(function (Middleware $middleware) {
|
||||||
|
//
|
||||||
|
})
|
||||||
|
->withExceptions(function (Exceptions $exceptions) {
|
||||||
|
//
|
||||||
|
})->create();
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://getcomposer.org/schema.json",
|
||||||
|
"name": "laravel/laravel",
|
||||||
|
"type": "project",
|
||||||
|
"description": "The skeleton application for the Laravel framework.",
|
||||||
|
"keywords": ["laravel", "framework"],
|
||||||
|
"license": "MIT",
|
||||||
|
"require": {
|
||||||
|
"php": "^8.2",
|
||||||
|
"laravel/framework": "^12.0",
|
||||||
|
"laravel/tinker": "^2.10.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fakerphp/faker": "^1.23",
|
||||||
|
"laravel/breeze": "^2.3",
|
||||||
|
"laravel/pail": "^1.2.2",
|
||||||
|
"laravel/pint": "^1.13",
|
||||||
|
"laravel/sail": "^1.41",
|
||||||
|
"mockery/mockery": "^1.6",
|
||||||
|
"nunomaduro/collision": "^8.6",
|
||||||
|
"phpunit/phpunit": "^11.5.3"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/",
|
||||||
|
"Database\\Factories\\": "database/factories/",
|
||||||
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover --ansi"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||||
|
],
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"@php artisan key:generate --ansi",
|
||||||
|
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
||||||
|
"@php artisan migrate --graceful --ansi"
|
||||||
|
],
|
||||||
|
"dev": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "12.x-dev"
|
||||||
|
},
|
||||||
|
"laravel": {
|
||||||
|
"dont-discover": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"sort-packages": true,
|
||||||
|
"allow-plugins": {
|
||||||
|
"pestphp/pest-plugin": true,
|
||||||
|
"php-http/discovery": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value is the name of your application, which will be used when the
|
||||||
|
| framework needs to place the application's name in a notification or
|
||||||
|
| other UI elements where an application name needs to be displayed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'name' => env('APP_NAME', 'Laravel'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the "environment" your application is currently
|
||||||
|
| running in. This may determine how you prefer to configure various
|
||||||
|
| services the application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| the application so that it's available within Artisan commands.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. The timezone
|
||||||
|
| is set to "UTC" by default as it is suitable for most use cases.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by Laravel's translation / localization methods. This option can be
|
||||||
|
| set to any locale for which you plan to have translation strings.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
|
|
||||||
|
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||||
|
|
||||||
|
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is utilized by Laravel's encryption services and should be set
|
||||||
|
| to a random, 32 character string to ensure that all encrypted values
|
||||||
|
| are secure. You should do this prior to deploying the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
|
'previous_keys' => [
|
||||||
|
...array_filter(
|
||||||
|
explode(',', env('APP_PREVIOUS_KEYS', ''))
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Maintenance Mode Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These configuration options determine the driver used to determine and
|
||||||
|
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||||
|
| allow maintenance mode to be controlled across multiple machines.
|
||||||
|
|
|
||||||
|
| Supported drivers: "file", "cache"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'maintenance' => [
|
||||||
|
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
||||||
|
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Defaults
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default authentication "guard" and password
|
||||||
|
| reset "broker" for your application. You may change these values
|
||||||
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => env('AUTH_GUARD', 'web'),
|
||||||
|
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| which utilizes session storage plus the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication guards have a user provider, which defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
||||||
|
| Supported: "session"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication guards have a user provider, which defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| providers to represent the model / table. These providers may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Resetting Passwords
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These configuration options specify the behavior of Laravel's password
|
||||||
|
| reset functionality, including the table utilized for token storage
|
||||||
|
| and the user provider that is invoked to actually retrieve users.
|
||||||
|
|
|
||||||
|
| The expiry time is the number of minutes that each reset token will be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
| The throttle setting is the number of seconds a user must wait before
|
||||||
|
| generating more password reset tokens. This prevents the user from
|
||||||
|
| quickly generating a very large amount of password reset tokens.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passwords' => [
|
||||||
|
'users' => [
|
||||||
|
'provider' => 'users',
|
||||||
|
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
||||||
|
'expire' => 60,
|
||||||
|
'throttle' => 60,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Confirmation Timeout
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define the amount of seconds before a password confirmation
|
||||||
|
| window expires and users are asked to re-enter their password via the
|
||||||
|
| confirmation screen. By default, the timeout lasts for three hours.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache store that will be used by the
|
||||||
|
| framework. This connection is utilized if another isn't explicitly
|
||||||
|
| specified when running a cache operation inside the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('CACHE_STORE', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Stores
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the cache "stores" for your application as
|
||||||
|
| well as their drivers. You may even define multiple stores for the
|
||||||
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
||||||
|
| Supported drivers: "array", "database", "file", "memcached",
|
||||||
|
| "redis", "dynamodb", "octane", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'stores' => [
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'driver' => 'array',
|
||||||
|
'serialize' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'connection' => env('DB_CACHE_CONNECTION'),
|
||||||
|
'table' => env('DB_CACHE_TABLE', 'cache'),
|
||||||
|
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
||||||
|
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'file' => [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path('framework/cache/data'),
|
||||||
|
'lock_path' => storage_path('framework/cache/data'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'memcached' => [
|
||||||
|
'driver' => 'memcached',
|
||||||
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||||
|
'sasl' => [
|
||||||
|
env('MEMCACHED_USERNAME'),
|
||||||
|
env('MEMCACHED_PASSWORD'),
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
|
],
|
||||||
|
'servers' => [
|
||||||
|
[
|
||||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MEMCACHED_PORT', 11211),
|
||||||
|
'weight' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
|
||||||
|
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'dynamodb' => [
|
||||||
|
'driver' => 'dynamodb',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'octane' => [
|
||||||
|
'driver' => 'octane',
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
||||||
|
| stores, there might be other applications using the same cache. For
|
||||||
|
| that reason, you may prefix every cache key to avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,174 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for database operations. This is
|
||||||
|
| the connection which will be utilized unless another connection
|
||||||
|
| is explicitly specified when you execute a query / statement.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Below are all of the database connections defined for your application.
|
||||||
|
| An example configuration is provided for each database system which
|
||||||
|
| is supported by Laravel. You're free to add / remove connections.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
|
'busy_timeout' => null,
|
||||||
|
'journal_mode' => null,
|
||||||
|
'synchronous' => null,
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'mariadb' => [
|
||||||
|
'driver' => 'mariadb',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'search_path' => 'public',
|
||||||
|
'sslmode' => 'prefer',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqlsrv' => [
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '1433'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||||
|
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run on the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => [
|
||||||
|
'table' => 'migrations',
|
||||||
|
'update_date_on_publish' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer body of commands than a typical key-value system
|
||||||
|
| such as Memcached. You may define your connection settings here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||||
|
'persistent' => env('REDIS_PERSISTENT', false),
|
||||||
|
],
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'username' => env('REDIS_USERNAME'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_DB', '0'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'username' => env('REDIS_USERNAME'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_CACHE_DB', '1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default filesystem disk that should be used
|
||||||
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
|
| based disks are available to your application for file storage.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Disks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Below you may configure as many filesystem disks as necessary, and you
|
||||||
|
| may even configure multiple disks for the same driver. Examples for
|
||||||
|
| most supported storage drivers are configured here for reference.
|
||||||
|
|
|
||||||
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disks' => [
|
||||||
|
|
||||||
|
'local' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/private'),
|
||||||
|
'serve' => true,
|
||||||
|
'throw' => false,
|
||||||
|
'report' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'public' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/public'),
|
||||||
|
'url' => env('APP_URL').'/storage',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
'report' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION'),
|
||||||
|
'bucket' => env('AWS_BUCKET'),
|
||||||
|
'url' => env('AWS_URL'),
|
||||||
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
|
'throw' => false,
|
||||||
|
'report' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Symbolic Links
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the symbolic links that will be created when the
|
||||||
|
| `storage:link` Artisan command is executed. The array keys should be
|
||||||
|
| the locations of the links and the values should be their targets.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'links' => [
|
||||||
|
public_path('storage') => storage_path('app/public'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Monolog\Handler\NullHandler;
|
||||||
|
use Monolog\Handler\StreamHandler;
|
||||||
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
use Monolog\Processor\PsrLogMessageProcessor;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default log channel that is utilized to write
|
||||||
|
| messages to your logs. The value provided here should match one of
|
||||||
|
| the channels present in the list of "channels" configured below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('LOG_CHANNEL', 'stack'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Deprecations Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the log channel that should be used to log warnings
|
||||||
|
| regarding deprecated PHP and library features. This allows you to get
|
||||||
|
| your application ready for upcoming major versions of dependencies.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'deprecations' => [
|
||||||
|
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||||
|
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Channels
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the log channels for your application. Laravel
|
||||||
|
| utilizes the Monolog PHP logging library, which includes a variety
|
||||||
|
| of powerful log handlers and formatters that you're free to use.
|
||||||
|
|
|
||||||
|
| Available drivers: "single", "daily", "slack", "syslog",
|
||||||
|
| "errorlog", "monolog", "custom", "stack"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'channels' => [
|
||||||
|
|
||||||
|
'stack' => [
|
||||||
|
'driver' => 'stack',
|
||||||
|
'channels' => explode(',', env('LOG_STACK', 'single')),
|
||||||
|
'ignore_exceptions' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'single' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'daily' => [
|
||||||
|
'driver' => 'daily',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'days' => env('LOG_DAILY_DAYS', 14),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'driver' => 'slack',
|
||||||
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
|
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
|
||||||
|
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
|
||||||
|
'level' => env('LOG_LEVEL', 'critical'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'papertrail' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||||
|
'handler_with' => [
|
||||||
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
|
],
|
||||||
|
|
||||||
|
'stderr' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'handler' => StreamHandler::class,
|
||||||
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
|
'with' => [
|
||||||
|
'stream' => 'php://stderr',
|
||||||
|
],
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
|
],
|
||||||
|
|
||||||
|
'syslog' => [
|
||||||
|
'driver' => 'syslog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'errorlog' => [
|
||||||
|
'driver' => 'errorlog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'null' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'handler' => NullHandler::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'emergency' => [
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,116 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Mailer
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default mailer that is used to send all email
|
||||||
|
| messages unless another mailer is explicitly specified when sending
|
||||||
|
| the message. All additional mailers can be configured within the
|
||||||
|
| "mailers" array. Examples of each type of mailer are provided.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('MAIL_MAILER', 'log'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mailer Configurations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure all of the mailers used by your application plus
|
||||||
|
| their respective settings. Several examples have been configured for
|
||||||
|
| you and you are free to add your own as your application requires.
|
||||||
|
|
|
||||||
|
| Laravel supports a variety of mail "transport" drivers that can be used
|
||||||
|
| when delivering an email. You may specify which one you're using for
|
||||||
|
| your mailers below. You may also add additional mailers if needed.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
|
||||||
|
| "postmark", "resend", "log", "array",
|
||||||
|
| "failover", "roundrobin"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailers' => [
|
||||||
|
|
||||||
|
'smtp' => [
|
||||||
|
'transport' => 'smtp',
|
||||||
|
'scheme' => env('MAIL_SCHEME'),
|
||||||
|
'url' => env('MAIL_URL'),
|
||||||
|
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MAIL_PORT', 2525),
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
'timeout' => null,
|
||||||
|
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'transport' => 'ses',
|
||||||
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'transport' => 'postmark',
|
||||||
|
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
|
||||||
|
// 'client' => [
|
||||||
|
// 'timeout' => 5,
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
'resend' => [
|
||||||
|
'transport' => 'resend',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sendmail' => [
|
||||||
|
'transport' => 'sendmail',
|
||||||
|
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'transport' => 'log',
|
||||||
|
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'transport' => 'array',
|
||||||
|
],
|
||||||
|
|
||||||
|
'failover' => [
|
||||||
|
'transport' => 'failover',
|
||||||
|
'mailers' => [
|
||||||
|
'smtp',
|
||||||
|
'log',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'roundrobin' => [
|
||||||
|
'transport' => 'roundrobin',
|
||||||
|
'mailers' => [
|
||||||
|
'ses',
|
||||||
|
'postmark',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all emails sent by your application to be sent from
|
||||||
|
| the same address. Here you may specify a name and address that is
|
||||||
|
| used globally for all emails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel's queue supports a variety of backends via a single, unified
|
||||||
|
| API, giving you convenient access to each backend using identical
|
||||||
|
| syntax for each. The default queue connection is defined below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('QUEUE_CONNECTION', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection options for every queue backend
|
||||||
|
| used by your application. An example configuration is provided for
|
||||||
|
| each backend supported by Laravel. You're also free to add more.
|
||||||
|
|
|
||||||
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sync' => [
|
||||||
|
'driver' => 'sync',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'connection' => env('DB_QUEUE_CONNECTION'),
|
||||||
|
'table' => env('DB_QUEUE_TABLE', 'jobs'),
|
||||||
|
'queue' => env('DB_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'beanstalkd' => [
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
|
||||||
|
'queue' => env('BEANSTALKD_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'block_for' => 0,
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqs' => [
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
|
'queue' => env('SQS_QUEUE', 'default'),
|
||||||
|
'suffix' => env('SQS_SUFFIX'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
|
||||||
|
'queue' => env('REDIS_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'block_for' => null,
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Job Batching
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following options configure the database and table that store job
|
||||||
|
| batching information. These options can be updated to any database
|
||||||
|
| connection and table which has been defined by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'batching' => [
|
||||||
|
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
'table' => 'job_batches',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control how and where failed jobs are stored. Laravel ships with
|
||||||
|
| support for storing failed jobs in a simple file or in a database.
|
||||||
|
|
|
||||||
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => [
|
||||||
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||||
|
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
'table' => 'failed_jobs',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||||
|
| location for this type of information, allowing packages to have
|
||||||
|
| a conventional file to locate the various service credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'token' => env('POSTMARK_TOKEN'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'resend' => [
|
||||||
|
'key' => env('RESEND_KEY'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'notifications' => [
|
||||||
|
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
||||||
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,217 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines the default session driver that is utilized for
|
||||||
|
| incoming requests. Laravel supports a variety of storage options to
|
||||||
|
| persist session data. Database storage is a great default choice.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "dynamodb", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle before it expires. If you want them
|
||||||
|
| to expire immediately when the browser is closed then you may
|
||||||
|
| indicate that via the expire_on_close configuration option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => (int) env('SESSION_LIFETIME', 120),
|
||||||
|
|
||||||
|
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to easily specify that all of your session data
|
||||||
|
| should be encrypted before it's stored. All encryption is performed
|
||||||
|
| automatically by Laravel and you may use the session like normal.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encrypt' => env('SESSION_ENCRYPT', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing the "file" session driver, the session files are placed
|
||||||
|
| on disk. The default storage location is defined here; however, you
|
||||||
|
| are free to provide another location where they should be stored.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path('framework/sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => env('SESSION_CONNECTION'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table to
|
||||||
|
| be used to store sessions. Of course, a sensible default is defined
|
||||||
|
| for you; however, you're welcome to change this to another table.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => env('SESSION_TABLE', 'sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using one of the framework's cache driven session backends, you may
|
||||||
|
| define the cache store which should be used to store the session data
|
||||||
|
| between requests. This must match one of your defined cache stores.
|
||||||
|
|
|
||||||
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => env('SESSION_STORE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the session cookie that is created by
|
||||||
|
| the framework. Typically, you should not need to change this value
|
||||||
|
| since doing so does not grant a meaningful security improvement.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => env(
|
||||||
|
'SESSION_COOKIE',
|
||||||
|
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application, but you're free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => env('SESSION_PATH', '/'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the domain and subdomains the session cookie is
|
||||||
|
| available to. By default, the cookie will be available to the root
|
||||||
|
| domain and all subdomains. Typically, this shouldn't be changed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('SESSION_DOMAIN'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you when it can't be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. It's unlikely you should disable this option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => env('SESSION_HTTP_ONLY', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Same-Site Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines how your cookies behave when cross-site requests
|
||||||
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||||
|
| will set this value to "lax" to permit secure cross-site requests.
|
||||||
|
|
|
||||||
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
||||||
|
|
|
||||||
|
| Supported: "lax", "strict", "none", null
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Partitioned Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will tie the cookie to the top-level site for
|
||||||
|
| a cross-site context. Partitioned cookies are accepted by the browser
|
||||||
|
| when flagged "secure" and the Same-Site attribute is set to "none".
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
*.sqlite*
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||||
|
*/
|
||||||
|
class UserFactory extends Factory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The current password being used by the factory.
|
||||||
|
*/
|
||||||
|
protected static ?string $password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the model's default state.
|
||||||
|
*
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public function definition(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => fake()->name(),
|
||||||
|
'email' => fake()->unique()->safeEmail(),
|
||||||
|
'email_verified_at' => now(),
|
||||||
|
'password' => static::$password ??= Hash::make('password'),
|
||||||
|
'remember_token' => Str::random(10),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicate that the model's email address should be unverified.
|
||||||
|
*/
|
||||||
|
public function unverified(): static
|
||||||
|
{
|
||||||
|
return $this->state(fn (array $attributes) => [
|
||||||
|
'email_verified_at' => null,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('users', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
|
$table->string('password');
|
||||||
|
$table->rememberToken();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||||
|
$table->string('email')->primary();
|
||||||
|
$table->string('token');
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('sessions', function (Blueprint $table) {
|
||||||
|
$table->string('id')->primary();
|
||||||
|
$table->foreignId('user_id')->nullable()->index();
|
||||||
|
$table->string('ip_address', 45)->nullable();
|
||||||
|
$table->text('user_agent')->nullable();
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->integer('last_activity')->index();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('users');
|
||||||
|
Schema::dropIfExists('password_reset_tokens');
|
||||||
|
Schema::dropIfExists('sessions');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('cache', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->mediumText('value');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('cache_locks', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->string('owner');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('cache');
|
||||||
|
Schema::dropIfExists('cache_locks');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('jobs', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('queue')->index();
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->unsignedTinyInteger('attempts');
|
||||||
|
$table->unsignedInteger('reserved_at')->nullable();
|
||||||
|
$table->unsignedInteger('available_at');
|
||||||
|
$table->unsignedInteger('created_at');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('job_batches', function (Blueprint $table) {
|
||||||
|
$table->string('id')->primary();
|
||||||
|
$table->string('name');
|
||||||
|
$table->integer('total_jobs');
|
||||||
|
$table->integer('pending_jobs');
|
||||||
|
$table->integer('failed_jobs');
|
||||||
|
$table->longText('failed_job_ids');
|
||||||
|
$table->mediumText('options')->nullable();
|
||||||
|
$table->integer('cancelled_at')->nullable();
|
||||||
|
$table->integer('created_at');
|
||||||
|
$table->integer('finished_at')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('uuid')->unique();
|
||||||
|
$table->text('connection');
|
||||||
|
$table->text('queue');
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->longText('exception');
|
||||||
|
$table->timestamp('failed_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('jobs');
|
||||||
|
Schema::dropIfExists('job_batches');
|
||||||
|
Schema::dropIfExists('failed_jobs');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('images', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
// Tambahkan ->nullable() di baris bawah ini
|
||||||
|
$table->foreignId('user_id')->nullable()->constrained()->onDelete('cascade');
|
||||||
|
$table->string('image_path');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('images');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('classifications', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('image_id')->constrained()->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->string('kelas');
|
||||||
|
$table->decimal('prob_fresh', 5, 3);
|
||||||
|
$table->string('tingkat_kesegaran');
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Seed the application's database.
|
||||||
|
*/
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
// User::factory(10)->create();
|
||||||
|
|
||||||
|
User::factory()->create([
|
||||||
|
'name' => 'Test User',
|
||||||
|
'email' => 'test@example.com',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "vite build",
|
||||||
|
"dev": "vite"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/forms": "^0.5.2",
|
||||||
|
"@tailwindcss/vite": "^4.0.0",
|
||||||
|
"alpinejs": "^3.4.2",
|
||||||
|
"autoprefixer": "^10.4.2",
|
||||||
|
"axios": "^1.7.4",
|
||||||
|
"concurrently": "^9.0.1",
|
||||||
|
"laravel-vite-plugin": "^1.2.0",
|
||||||
|
"postcss": "^8.4.31",
|
||||||
|
"tailwindcss": "^3.1.0",
|
||||||
|
"vite": "^6.0.11"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Unit">
|
||||||
|
<directory>tests/Unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="Feature">
|
||||||
|
<directory>tests/Feature</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<source>
|
||||||
|
<include>
|
||||||
|
<directory>app</directory>
|
||||||
|
</include>
|
||||||
|
</source>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||||
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
|
<env name="CACHE_STORE" value="array"/>
|
||||||
|
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
|
||||||
|
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
|
||||||
|
<env name="MAIL_MAILER" value="array"/>
|
||||||
|
<env name="PULSE_ENABLED" value="false"/>
|
||||||
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
export default {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
# Handle X-XSRF-Token Header
|
||||||
|
RewriteCond %{HTTP:x-xsrf-token} .
|
||||||
|
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Send Requests To Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Application;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
// Determine if the application is in maintenance mode...
|
||||||
|
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
||||||
|
require $maintenance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register the Composer autoloader...
|
||||||
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
|
// Bootstrap Laravel and handle the request...
|
||||||
|
/** @var Application $app */
|
||||||
|
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||||
|
|
||||||
|
$app->handleRequest(Request::capture());
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import './bootstrap';
|
||||||
|
|
||||||
|
import Alpine from 'alpinejs';
|
||||||
|
|
||||||
|
window.Alpine = Alpine;
|
||||||
|
|
||||||
|
Alpine.start();
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
import axios from 'axios';
|
||||||
|
window.axios = axios;
|
||||||
|
|
||||||
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<x-guest-layout>
|
||||||
|
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('password.confirm') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<!-- Password -->
|
||||||
|
<div>
|
||||||
|
<x-input-label for="password" :value="__('Password')" />
|
||||||
|
|
||||||
|
<x-text-input id="password" class="block mt-1 w-full"
|
||||||
|
type="password"
|
||||||
|
name="password"
|
||||||
|
required autocomplete="current-password" />
|
||||||
|
|
||||||
|
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex justify-end mt-4">
|
||||||
|
<x-primary-button>
|
||||||
|
{{ __('Confirm') }}
|
||||||
|
</x-primary-button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</x-guest-layout>
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Lupa Password | FiFreshChecker</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'sans-serif'],
|
||||||
|
heading: ['Poppins', 'sans-serif']
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
primary: '#0A66C2',
|
||||||
|
'primary-dark': '#004182',
|
||||||
|
accent: '#00C4CC'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.hero-gradient {
|
||||||
|
background: linear-gradient(135deg, #0B192C 0%, #1A365D 50%, #0A66C2 100%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="font-sans antialiased hero-gradient min-h-screen flex items-center justify-center px-4 py-12">
|
||||||
|
|
||||||
|
<div class="w-full max-w-md">
|
||||||
|
|
||||||
|
{{-- Logo --}}
|
||||||
|
<div class="text-center mb-8">
|
||||||
|
{{-- Ganti yang lama dengan ini --}}
|
||||||
|
<a href="{{ route('home') }}" class="font-heading font-bold text-2xl text-white hover:opacity-80 transition whitespace-nowrap inline-block">
|
||||||
|
<i class="bi bi-droplet-half text-cyan-400 text-3xl align-middle"></i><span class="align-middle">FiFresh</span><span class="text-accent align-middle">Checker</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Card --}}
|
||||||
|
<div class="bg-white rounded-3xl shadow-2xl px-8 py-10">
|
||||||
|
|
||||||
|
{{-- Icon --}}
|
||||||
|
<div class="flex justify-center mb-6">
|
||||||
|
<div class="w-16 h-16 bg-primary/10 rounded-2xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-envelope-check text-primary text-3xl"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2 class="font-heading text-2xl font-bold text-gray-900 text-center mb-2">Lupa Password?</h2>
|
||||||
|
<p class="text-gray-500 text-sm text-center mb-6 leading-relaxed">
|
||||||
|
Masukkan email yang terdaftar, lalu kamu bisa langsung membuat password baru.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{{-- Session Status --}}
|
||||||
|
@if (session('status'))
|
||||||
|
<div class="mb-5 flex items-start gap-3 bg-green-50 border border-green-200 rounded-xl px-4 py-3">
|
||||||
|
<i class="bi bi-check-circle-fill text-green-500 mt-0.5 flex-shrink-0"></i>
|
||||||
|
<p class="text-sm text-green-700 font-medium">{{ session('status') }}</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('password.email') }}" class="space-y-5">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
{{-- Email --}}
|
||||||
|
<div>
|
||||||
|
<label for="email" class="block text-sm font-semibold text-gray-700 mb-1.5">Alamat Email</label>
|
||||||
|
<div class="relative">
|
||||||
|
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
|
||||||
|
<i class="bi bi-envelope"></i>
|
||||||
|
</span>
|
||||||
|
<input id="email" type="email" name="email" value="{{ old('email') }}"
|
||||||
|
class="w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition @error('email') border-red-400 @enderror"
|
||||||
|
placeholder="contoh@email.com" required autofocus>
|
||||||
|
</div>
|
||||||
|
@error('email')
|
||||||
|
<p class="mt-1.5 text-xs text-red-500 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Submit --}}
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full bg-primary hover:bg-primary-dark text-white font-bold py-3 rounded-xl transition-all hover:shadow-lg text-sm flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-arrow-right-circle"></i> Lanjutkan
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{-- Back to login --}}
|
||||||
|
<div class="text-center pt-1">
|
||||||
|
<a href="{{ route('login') }}" class="text-sm text-gray-500 hover:text-primary transition-colors flex items-center justify-center gap-1.5">
|
||||||
|
<i class="bi bi-arrow-left text-xs"></i> Kembali ke halaman masuk
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center text-white/30 text-xs mt-6">© 2026 FiFreshChecker. Tugas Akhir D3 Manajemen Informatika.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,164 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Login | FiFreshChecker</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'sans-serif'],
|
||||||
|
heading: ['Poppins', 'sans-serif'],
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
primary: '#0A66C2',
|
||||||
|
'primary-dark': '#004182',
|
||||||
|
accent: '#00C4CC',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700;800&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="font-sans text-gray-800 antialiased selection:bg-primary/20 bg-gradient-to-br from-[#0B192C] via-[#1A365D] to-primary-dark min-h-screen flex items-center justify-center relative overflow-hidden">
|
||||||
|
|
||||||
|
<div class="absolute inset-0 opacity-5" style="background-image: url('https://www.transparenttextures.com/patterns/cubes.png'); z-index: 0;"></div>
|
||||||
|
|
||||||
|
<div class="w-full max-w-md bg-white rounded-[24px] shadow-2xl p-8 sm:p-10 relative z-10 mx-4 border border-white/20">
|
||||||
|
|
||||||
|
<div class="text-center mb-8">
|
||||||
|
<a href="{{ route('home') }}" class="inline-flex items-center justify-center mb-4">
|
||||||
|
<div class="w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-droplet-half text-cyan-500 text-2xl"></i>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<h2 class="text-2xl sm:text-3xl font-bold text-gray-900 font-heading mb-2">
|
||||||
|
Selamat Datang Kembali
|
||||||
|
</h2>
|
||||||
|
<p class="text-gray-500 text-sm sm:text-base">
|
||||||
|
Masuk untuk menyimpan & melihat riwayat klasifikasi ikan kamu.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('login') }}" class="space-y-5">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
{{-- Notif error login --}}
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="flex items-start gap-3 bg-red-50 border border-red-200 rounded-xl px-4 py-3">
|
||||||
|
<i class="bi bi-exclamation-circle-fill text-red-500 mt-0.5 flex-shrink-0"></i>
|
||||||
|
<p class="text-sm text-red-600 font-medium">
|
||||||
|
Email atau kata sandi yang kamu masukkan salah.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Session status --}}
|
||||||
|
@if (session('status'))
|
||||||
|
<div class="flex items-start gap-3 bg-green-50 border border-green-200 rounded-xl px-4 py-3">
|
||||||
|
<i class="bi bi-check-circle-fill text-green-500 mt-0.5 flex-shrink-0"></i>
|
||||||
|
<p class="text-sm text-green-700 font-medium">{{ session('status') }}</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- EMAIL --}}
|
||||||
|
<div>
|
||||||
|
<label for="email" class="block text-sm font-medium text-gray-700 mb-1.5">
|
||||||
|
Alamat Email
|
||||||
|
</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none">
|
||||||
|
<i class="bi bi-envelope text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
name="email"
|
||||||
|
id="email"
|
||||||
|
value="{{ old('email') }}"
|
||||||
|
required
|
||||||
|
placeholder="contoh@email.com"
|
||||||
|
class="w-full border border-gray-300 rounded-xl pl-10 pr-4 py-3 text-sm focus:ring-2 focus:ring-primary/20 focus:border-primary focus:outline-none transition-colors @error('email') border-red-400 @enderror"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- PASSWORD --}}
|
||||||
|
<div>
|
||||||
|
<label for="password" class="block text-sm font-medium text-gray-700 mb-1.5">
|
||||||
|
Kata Sandi
|
||||||
|
</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none">
|
||||||
|
<i class="bi bi-lock text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
name="password"
|
||||||
|
id="password"
|
||||||
|
required
|
||||||
|
placeholder="••••••••"
|
||||||
|
class="w-full border border-gray-300 rounded-xl pl-10 pr-12 py-3 text-sm focus:ring-2 focus:ring-primary/20 focus:border-primary focus:outline-none transition-colors"
|
||||||
|
>
|
||||||
|
<button type="button" onclick="togglePassword('password', 'icon-password')"
|
||||||
|
class="absolute inset-y-0 right-0 pr-3.5 flex items-center text-gray-400 hover:text-primary transition-colors">
|
||||||
|
<i id="icon-password" class="bi bi-eye text-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center justify-between">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<input id="remember-me" name="remember" type="checkbox" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded cursor-pointer">
|
||||||
|
<label for="remember-me" class="ml-2 block text-sm text-gray-600 cursor-pointer">
|
||||||
|
Ingat saya
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="text-sm">
|
||||||
|
<a href="{{ route('password.request') }}" class="font-medium text-primary hover:text-primary-dark transition-colors">
|
||||||
|
Lupa sandi?
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="w-full bg-primary hover:bg-primary-dark text-white font-semibold py-3 px-4 rounded-xl transition-all duration-300 hover:-translate-y-1 hover:shadow-[0_8px_20px_rgba(10,102,194,0.25)]"
|
||||||
|
>
|
||||||
|
Masuk Sekarang
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="text-center mt-6 text-sm text-gray-600">
|
||||||
|
Belum memiliki akun?
|
||||||
|
<a href="{{ route('register') }}" class="font-semibold text-primary hover:text-primary-dark transition-colors hover:underline">
|
||||||
|
Daftar di sini
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function togglePassword(inputId, iconId) {
|
||||||
|
const input = document.getElementById(inputId);
|
||||||
|
const icon = document.getElementById(iconId);
|
||||||
|
if (input.type === 'password') {
|
||||||
|
input.type = 'text';
|
||||||
|
icon.classList.replace('bi-eye', 'bi-eye-slash');
|
||||||
|
} else {
|
||||||
|
input.type = 'password';
|
||||||
|
icon.classList.replace('bi-eye-slash', 'bi-eye');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,192 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Daftar Akun | FiFreshChecker</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'sans-serif'],
|
||||||
|
heading: ['Poppins', 'sans-serif'],
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
primary: '#0A66C2',
|
||||||
|
'primary-dark': '#004182',
|
||||||
|
accent: '#00C4CC',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700;800&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="font-sans text-gray-800 antialiased selection:bg-primary/20 bg-gradient-to-br from-[#0B192C] via-[#1A365D] to-primary-dark min-h-screen flex items-center justify-center relative overflow-hidden py-10">
|
||||||
|
|
||||||
|
<div class="absolute inset-0 opacity-5" style="background-image: url('https://www.transparenttextures.com/patterns/cubes.png'); z-index: 0;"></div>
|
||||||
|
|
||||||
|
<div class="w-full max-w-lg bg-white rounded-[24px] shadow-2xl p-8 sm:p-10 relative z-10 mx-4 border border-white/20">
|
||||||
|
|
||||||
|
<div class="text-center mb-8">
|
||||||
|
<a href="/" class="inline-flex items-center justify-center mb-4">
|
||||||
|
<div class="w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-person-plus text-cyan-500 text-2xl"></i>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<h2 class="text-2xl sm:text-3xl font-bold text-gray-900 font-heading mb-2">
|
||||||
|
Buat Akun Baru
|
||||||
|
</h2>
|
||||||
|
<p class="text-gray-500 text-sm sm:text-base">
|
||||||
|
Bergabunglah untuk mulai menganalisis kesegaran ikan dengan AI.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('register') }}" class="space-y-5">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
{{-- NAMA --}}
|
||||||
|
<div>
|
||||||
|
<label for="name" class="block text-sm font-medium text-gray-700 mb-1.5">
|
||||||
|
Nama Lengkap
|
||||||
|
</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none">
|
||||||
|
<i class="bi bi-person text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="name"
|
||||||
|
id="name"
|
||||||
|
required
|
||||||
|
placeholder="Masukkan nama lengkap Anda"
|
||||||
|
value="{{ old('name') }}"
|
||||||
|
class="w-full border @error('name') border-red-500 focus:ring-red-500/20 focus:border-red-500 @else border-gray-300 focus:ring-primary/20 focus:border-primary @enderror rounded-xl pl-10 pr-4 py-3 text-sm focus:outline-none transition-colors"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
@error('name')
|
||||||
|
<p class="text-red-500 text-xs font-medium mt-1.5 pl-1 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- EMAIL --}}
|
||||||
|
<div>
|
||||||
|
<label for="email" class="block text-sm font-medium text-gray-700 mb-1.5">
|
||||||
|
Alamat Email
|
||||||
|
</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none">
|
||||||
|
<i class="bi bi-envelope text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
name="email"
|
||||||
|
id="email"
|
||||||
|
required
|
||||||
|
placeholder="contoh@email.com"
|
||||||
|
value="{{ old('email') }}"
|
||||||
|
class="w-full border @error('email') border-red-500 focus:ring-red-500/20 focus:border-red-500 @else border-gray-300 focus:ring-primary/20 focus:border-primary @enderror rounded-xl pl-10 pr-4 py-3 text-sm focus:outline-none transition-colors"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
@error('email')
|
||||||
|
<p class="text-red-500 text-xs font-medium mt-1.5 pl-1 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- PASSWORD --}}
|
||||||
|
<div>
|
||||||
|
<label for="password" class="block text-sm font-medium text-gray-700 mb-1.5">
|
||||||
|
Kata Sandi
|
||||||
|
</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none">
|
||||||
|
<i class="bi bi-lock text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
name="password"
|
||||||
|
id="password"
|
||||||
|
required
|
||||||
|
placeholder="Minimal 8 karakter"
|
||||||
|
class="w-full border @error('password') border-red-500 @else border-gray-300 @enderror rounded-xl pl-10 pr-12 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors"
|
||||||
|
>
|
||||||
|
<button type="button" onclick="togglePassword('password', 'icon-pass')"
|
||||||
|
class="absolute inset-y-0 right-0 pr-3.5 flex items-center text-gray-400 hover:text-primary transition-colors">
|
||||||
|
<i id="icon-pass" class="bi bi-eye text-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@error('password')
|
||||||
|
<p class="text-red-500 text-xs font-medium mt-1.5 pl-1 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- KONFIRMASI PASSWORD --}}
|
||||||
|
<div>
|
||||||
|
<label for="password_confirmation" class="block text-sm font-medium text-gray-700 mb-1.5">
|
||||||
|
Konfirmasi Kata Sandi
|
||||||
|
</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none">
|
||||||
|
<i class="bi bi-shield-lock text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
name="password_confirmation"
|
||||||
|
id="password_confirmation"
|
||||||
|
required
|
||||||
|
placeholder="Ulangi kata sandi Anda"
|
||||||
|
class="w-full border border-gray-300 rounded-xl pl-10 pr-12 py-3 text-sm focus:ring-2 focus:ring-primary/20 focus:border-primary focus:outline-none transition-colors"
|
||||||
|
>
|
||||||
|
<button type="button" onclick="togglePassword('password_confirmation', 'icon-confirm')"
|
||||||
|
class="absolute inset-y-0 right-0 pr-3.5 flex items-center text-gray-400 hover:text-primary transition-colors">
|
||||||
|
<i id="icon-confirm" class="bi bi-eye text-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="w-full bg-primary hover:bg-primary-dark text-white font-semibold py-3 px-4 rounded-xl transition-all duration-300 hover:-translate-y-1 hover:shadow-[0_8px_20px_rgba(10,102,194,0.25)] mt-6"
|
||||||
|
>
|
||||||
|
Daftar Sekarang
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="text-center mt-8 text-sm text-gray-600">
|
||||||
|
Sudah memiliki akun?
|
||||||
|
<a href="/login" class="font-semibold text-primary hover:text-primary-dark transition-colors hover:underline">
|
||||||
|
Masuk di sini
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function togglePassword(inputId, iconId) {
|
||||||
|
const input = document.getElementById(inputId);
|
||||||
|
const icon = document.getElementById(iconId);
|
||||||
|
if (input.type === 'password') {
|
||||||
|
input.type = 'text';
|
||||||
|
icon.classList.replace('bi-eye', 'bi-eye-slash');
|
||||||
|
} else {
|
||||||
|
input.type = 'password';
|
||||||
|
icon.classList.replace('bi-eye-slash', 'bi-eye');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Buat Password Baru | FiFreshChecker</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: { sans: ['Inter', 'sans-serif'], heading: ['Poppins', 'sans-serif'] },
|
||||||
|
colors: { primary: '#0A66C2', 'primary-dark': '#004182', accent: '#00C4CC' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap" rel="stylesheet">
|
||||||
|
<style>.hero-gradient { background: linear-gradient(135deg, #0B192C 0%, #1A365D 50%, #0A66C2 100%); }</style>
|
||||||
|
</head>
|
||||||
|
<body class="font-sans antialiased hero-gradient min-h-screen flex items-center justify-center px-4 py-12">
|
||||||
|
|
||||||
|
<div class="w-full max-w-md">
|
||||||
|
|
||||||
|
<div class="text-center mb-8">
|
||||||
|
<a href="{{ route('home') }}" class="font-heading font-bold text-2xl text-white hover:opacity-80 transition whitespace-nowrap inline-block"><i class="bi bi-droplet-half text-cyan-400 text-3xl align-middle"></i><span class="align-middle">FiFresh</span><span class="text-accent align-middle">Checker</span></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white rounded-3xl shadow-2xl px-8 py-10">
|
||||||
|
<div class="flex justify-center mb-6">
|
||||||
|
<div class="w-16 h-16 bg-primary/10 rounded-2xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-shield-lock text-primary text-3xl"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2 class="font-heading text-2xl font-bold text-gray-900 text-center mb-1">Buat Password Baru</h2>
|
||||||
|
<p class="text-gray-500 text-sm text-center mb-6">
|
||||||
|
Untuk akun <strong class="text-primary">{{ session('reset_email') }}</strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('password.direct.store') }}" class="space-y-5">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
{{-- PASSWORD BARU --}}
|
||||||
|
<div>
|
||||||
|
<label for="password" class="block text-sm font-semibold text-gray-700 mb-1.5">Password Baru</label>
|
||||||
|
<div class="relative">
|
||||||
|
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
|
||||||
|
<i class="bi bi-lock"></i>
|
||||||
|
</span>
|
||||||
|
<input id="password" type="password" name="password"
|
||||||
|
class="w-full pl-10 pr-12 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition @error('password') border-red-400 @enderror"
|
||||||
|
placeholder="Minimal 8 karakter" required>
|
||||||
|
<button type="button" onclick="togglePassword('password', 'icon-pass-new')"
|
||||||
|
class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-primary transition-colors">
|
||||||
|
<i id="icon-pass-new" class="bi bi-eye text-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@error('password')
|
||||||
|
<p class="mt-1.5 text-xs text-red-500 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- KONFIRMASI PASSWORD --}}
|
||||||
|
<div>
|
||||||
|
<label for="password_confirmation" class="block text-sm font-semibold text-gray-700 mb-1.5">Konfirmasi Password</label>
|
||||||
|
<div class="relative">
|
||||||
|
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
|
||||||
|
<i class="bi bi-lock-fill"></i>
|
||||||
|
</span>
|
||||||
|
<input id="password_confirmation" type="password" name="password_confirmation"
|
||||||
|
class="w-full pl-10 pr-12 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition"
|
||||||
|
placeholder="Ulangi password baru" required>
|
||||||
|
<button type="button" onclick="togglePassword('password_confirmation', 'icon-pass-confirm')"
|
||||||
|
class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-primary transition-colors">
|
||||||
|
<i id="icon-pass-confirm" class="bi bi-eye text-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full bg-primary hover:bg-primary-dark text-white font-bold py-3 rounded-xl transition-all hover:shadow-lg text-sm flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-check-circle"></i> Simpan Password Baru
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="text-center pt-1">
|
||||||
|
<a href="{{ route('password.request') }}" class="text-sm text-gray-500 hover:text-primary transition-colors flex items-center justify-center gap-1.5">
|
||||||
|
<i class="bi bi-arrow-left text-xs"></i> Kembali
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center text-white/30 text-xs mt-6">© 2026 FiFreshChecker. Tugas Akhir D3 Manajemen Informatika.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function togglePassword(inputId, iconId) {
|
||||||
|
const input = document.getElementById(inputId);
|
||||||
|
const icon = document.getElementById(iconId);
|
||||||
|
if (input.type === 'password') {
|
||||||
|
input.type = 'text';
|
||||||
|
icon.classList.replace('bi-eye', 'bi-eye-slash');
|
||||||
|
} else {
|
||||||
|
input.type = 'password';
|
||||||
|
icon.classList.replace('bi-eye-slash', 'bi-eye');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Reset Password | FiFreshChecker</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'sans-serif'],
|
||||||
|
heading: ['Poppins', 'sans-serif']
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
primary: '#0A66C2',
|
||||||
|
'primary-dark': '#004182',
|
||||||
|
accent: '#00C4CC'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.hero-gradient {
|
||||||
|
background: linear-gradient(135deg, #0B192C 0%, #1A365D 50%, #0A66C2 100%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="font-sans antialiased hero-gradient min-h-screen flex items-center justify-center px-4 py-12">
|
||||||
|
|
||||||
|
<div class="w-full max-w-md">
|
||||||
|
|
||||||
|
{{-- Logo --}}
|
||||||
|
<div class="text-center mb-8">
|
||||||
|
<a href="{{ route('home') }}" class="inline-flex items-center gap-2 font-heading font-bold text-2xl text-white hover:opacity-80 transition">
|
||||||
|
<i class="bi bi-droplet-half text-cyan-400 text-3xl"></i>
|
||||||
|
FiFresh<span class="text-accent">Checker</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Card --}}
|
||||||
|
<div class="bg-white rounded-3xl shadow-2xl px-8 py-10">
|
||||||
|
|
||||||
|
{{-- Icon --}}
|
||||||
|
<div class="flex justify-center mb-6">
|
||||||
|
<div class="w-16 h-16 bg-primary/10 rounded-2xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-shield-lock text-primary text-3xl"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2 class="font-heading text-2xl font-bold text-gray-900 text-center mb-2">Buat Password Baru</h2>
|
||||||
|
<p class="text-gray-500 text-sm text-center mb-6 leading-relaxed">
|
||||||
|
Masukkan password baru kamu di bawah ini.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('password.store') }}" class="space-y-5">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="token" value="{{ $request->route('token') }}">
|
||||||
|
|
||||||
|
{{-- Email --}}
|
||||||
|
<div>
|
||||||
|
<label for="email" class="block text-sm font-semibold text-gray-700 mb-1.5">Alamat Email</label>
|
||||||
|
<div class="relative">
|
||||||
|
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
|
||||||
|
<i class="bi bi-envelope"></i>
|
||||||
|
</span>
|
||||||
|
<input id="email" type="email" name="email"
|
||||||
|
value="{{ old('email', $request->email) }}"
|
||||||
|
class="w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition @error('email') border-red-400 @enderror"
|
||||||
|
placeholder="contoh@email.com" required autofocus autocomplete="username">
|
||||||
|
</div>
|
||||||
|
@error('email')
|
||||||
|
<p class="mt-1.5 text-xs text-red-500 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Password Baru --}}
|
||||||
|
<div>
|
||||||
|
<label for="password" class="block text-sm font-semibold text-gray-700 mb-1.5">Password Baru</label>
|
||||||
|
<div class="relative">
|
||||||
|
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
|
||||||
|
<i class="bi bi-lock"></i>
|
||||||
|
</span>
|
||||||
|
<input id="password" type="password" name="password"
|
||||||
|
class="w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition @error('password') border-red-400 @enderror"
|
||||||
|
placeholder="••••••••" required autocomplete="new-password">
|
||||||
|
</div>
|
||||||
|
@error('password')
|
||||||
|
<p class="mt-1.5 text-xs text-red-500 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Konfirmasi Password --}}
|
||||||
|
<div>
|
||||||
|
<label for="password_confirmation" class="block text-sm font-semibold text-gray-700 mb-1.5">Konfirmasi Password</label>
|
||||||
|
<div class="relative">
|
||||||
|
<span class="absolute inset-y-0 left-0 pl-3 flex items-center text-gray-400">
|
||||||
|
<i class="bi bi-lock-fill"></i>
|
||||||
|
</span>
|
||||||
|
<input id="password_confirmation" type="password" name="password_confirmation"
|
||||||
|
class="w-full pl-10 pr-4 py-3 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition @error('password_confirmation') border-red-400 @enderror"
|
||||||
|
placeholder="••••••••" required autocomplete="new-password">
|
||||||
|
</div>
|
||||||
|
@error('password_confirmation')
|
||||||
|
<p class="mt-1.5 text-xs text-red-500 flex items-center gap-1">
|
||||||
|
<i class="bi bi-exclamation-circle"></i> {{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Submit --}}
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full bg-primary hover:bg-primary-dark text-white font-bold py-3 rounded-xl transition-all hover:shadow-lg text-sm flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-check-circle"></i> Simpan Password Baru
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{{-- Back to login --}}
|
||||||
|
<div class="text-center pt-1">
|
||||||
|
<a href="{{ route('login') }}" class="text-sm text-gray-500 hover:text-primary transition-colors flex items-center justify-center gap-1.5">
|
||||||
|
<i class="bi bi-arrow-left text-xs"></i> Kembali ke halaman masuk
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center text-white/30 text-xs mt-6">© 2026 FiFreshChecker. Tugas Akhir D3 Manajemen Informatika.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<x-guest-layout>
|
||||||
|
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
{{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (session('status') == 'verification-link-sent')
|
||||||
|
<div class="mb-4 font-medium text-sm text-green-600 dark:text-green-400">
|
||||||
|
{{ __('A new verification link has been sent to the email address you provided during registration.') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="mt-4 flex items-center justify-between">
|
||||||
|
<form method="POST" action="{{ route('verification.send') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<x-primary-button>
|
||||||
|
{{ __('Resend Verification Email') }}
|
||||||
|
</x-primary-button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<button type="submit" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">
|
||||||
|
{{ __('Log Out') }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</x-guest-layout>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="0 0 316 316" xmlns="http://www.w3.org/2000/svg" {{ $attributes }}>
|
||||||
|
<path d="M305.8 81.125C305.77 80.995 305.69 80.885 305.65 80.755C305.56 80.525 305.49 80.285 305.37 80.075C305.29 79.935 305.17 79.815 305.07 79.685C304.94 79.515 304.83 79.325 304.68 79.175C304.55 79.045 304.39 78.955 304.25 78.845C304.09 78.715 303.95 78.575 303.77 78.475L251.32 48.275C249.97 47.495 248.31 47.495 246.96 48.275L194.51 78.475C194.33 78.575 194.19 78.725 194.03 78.845C193.89 78.955 193.73 79.045 193.6 79.175C193.45 79.325 193.34 79.515 193.21 79.685C193.11 79.815 192.99 79.935 192.91 80.075C192.79 80.285 192.71 80.525 192.63 80.755C192.58 80.875 192.51 80.995 192.48 81.125C192.38 81.495 192.33 81.875 192.33 82.265V139.625L148.62 164.795V52.575C148.62 52.185 148.57 51.805 148.47 51.435C148.44 51.305 148.36 51.195 148.32 51.065C148.23 50.835 148.16 50.595 148.04 50.385C147.96 50.245 147.84 50.125 147.74 49.995C147.61 49.825 147.5 49.635 147.35 49.485C147.22 49.355 147.06 49.265 146.92 49.155C146.76 49.025 146.62 48.885 146.44 48.785L93.99 18.585C92.64 17.805 90.98 17.805 89.63 18.585L37.18 48.785C37 48.885 36.86 49.035 36.7 49.155C36.56 49.265 36.4 49.355 36.27 49.485C36.12 49.635 36.01 49.825 35.88 49.995C35.78 50.125 35.66 50.245 35.58 50.385C35.46 50.595 35.38 50.835 35.3 51.065C35.25 51.185 35.18 51.305 35.15 51.435C35.05 51.805 35 52.185 35 52.575V232.235C35 233.795 35.84 235.245 37.19 236.025L142.1 296.425C142.33 296.555 142.58 296.635 142.82 296.725C142.93 296.765 143.04 296.835 143.16 296.865C143.53 296.965 143.9 297.015 144.28 297.015C144.66 297.015 145.03 296.965 145.4 296.865C145.5 296.835 145.59 296.775 145.69 296.745C145.95 296.655 146.21 296.565 146.45 296.435L251.36 236.035C252.72 235.255 253.55 233.815 253.55 232.245V174.885L303.81 145.945C305.17 145.165 306 143.725 306 142.155V82.265C305.95 81.875 305.89 81.495 305.8 81.125ZM144.2 227.205L100.57 202.515L146.39 176.135L196.66 147.195L240.33 172.335L208.29 190.625L144.2 227.205ZM244.75 114.995V164.795L226.39 154.225L201.03 139.625V89.825L219.39 100.395L244.75 114.995ZM249.12 57.105L292.81 82.265L249.12 107.425L205.43 82.265L249.12 57.105ZM114.49 184.425L96.13 194.995V85.305L121.49 70.705L139.85 60.135V169.815L114.49 184.425ZM91.76 27.425L135.45 52.585L91.76 77.745L48.07 52.585L91.76 27.425ZM43.67 60.135L62.03 70.705L87.39 85.305V202.545V202.555V202.565C87.39 202.735 87.44 202.895 87.46 203.055C87.49 203.265 87.49 203.485 87.55 203.695V203.705C87.6 203.875 87.69 204.035 87.76 204.195C87.84 204.375 87.89 204.575 87.99 204.745C87.99 204.745 87.99 204.755 88 204.755C88.09 204.905 88.22 205.035 88.33 205.175C88.45 205.335 88.55 205.495 88.69 205.635L88.7 205.645C88.82 205.765 88.98 205.855 89.12 205.965C89.28 206.085 89.42 206.225 89.59 206.325C89.6 206.325 89.6 206.325 89.61 206.335C89.62 206.335 89.62 206.345 89.63 206.345L139.87 234.775V285.065L43.67 229.705V60.135ZM244.75 229.705L148.58 285.075V234.775L219.8 194.115L244.75 179.875V229.705ZM297.2 139.625L253.49 164.795V114.995L278.85 100.395L297.21 89.825V139.625H297.2Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
|
|
@ -0,0 +1,7 @@
|
||||||
|
@props(['status'])
|
||||||
|
|
||||||
|
@if ($status)
|
||||||
|
<div {{ $attributes->merge(['class' => 'font-medium text-sm text-green-600 dark:text-green-400']) }}>
|
||||||
|
{{ $status }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-500 active:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</button>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<a {{ $attributes->merge(['class' => 'block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out']) }}>{{ $slot }}</a>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white dark:bg-gray-700'])
|
||||||
|
|
||||||
|
@php
|
||||||
|
$alignmentClasses = match ($align) {
|
||||||
|
'left' => 'ltr:origin-top-left rtl:origin-top-right start-0',
|
||||||
|
'top' => 'origin-top',
|
||||||
|
default => 'ltr:origin-top-right rtl:origin-top-left end-0',
|
||||||
|
};
|
||||||
|
|
||||||
|
$width = match ($width) {
|
||||||
|
'48' => 'w-48',
|
||||||
|
default => $width,
|
||||||
|
};
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
|
||||||
|
<div @click="open = ! open">
|
||||||
|
{{ $trigger }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div x-show="open"
|
||||||
|
x-transition:enter="transition ease-out duration-200"
|
||||||
|
x-transition:enter-start="opacity-0 scale-95"
|
||||||
|
x-transition:enter-end="opacity-100 scale-100"
|
||||||
|
x-transition:leave="transition ease-in duration-75"
|
||||||
|
x-transition:leave-start="opacity-100 scale-100"
|
||||||
|
x-transition:leave-end="opacity-0 scale-95"
|
||||||
|
class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}"
|
||||||
|
style="display: none;"
|
||||||
|
@click="open = false">
|
||||||
|
<div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
|
||||||
|
{{ $content }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
@props(['messages'])
|
||||||
|
|
||||||
|
@if ($messages)
|
||||||
|
<ul {{ $attributes->merge(['class' => 'text-sm text-red-600 dark:text-red-400 space-y-1']) }}>
|
||||||
|
@foreach ((array) $messages as $message)
|
||||||
|
<li>{{ $message }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
@endif
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
@props(['value'])
|
||||||
|
|
||||||
|
<label {{ $attributes->merge(['class' => 'block font-medium text-sm text-gray-700 dark:text-gray-300']) }}>
|
||||||
|
{{ $value ?? $slot }}
|
||||||
|
</label>
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
@props([
|
||||||
|
'name',
|
||||||
|
'show' => false,
|
||||||
|
'maxWidth' => '2xl'
|
||||||
|
])
|
||||||
|
|
||||||
|
@php
|
||||||
|
$maxWidth = [
|
||||||
|
'sm' => 'sm:max-w-sm',
|
||||||
|
'md' => 'sm:max-w-md',
|
||||||
|
'lg' => 'sm:max-w-lg',
|
||||||
|
'xl' => 'sm:max-w-xl',
|
||||||
|
'2xl' => 'sm:max-w-2xl',
|
||||||
|
][$maxWidth];
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<div
|
||||||
|
x-data="{
|
||||||
|
show: @js($show),
|
||||||
|
focusables() {
|
||||||
|
// All focusable element types...
|
||||||
|
let selector = 'a, button, input:not([type=\'hidden\']), textarea, select, details, [tabindex]:not([tabindex=\'-1\'])'
|
||||||
|
return [...$el.querySelectorAll(selector)]
|
||||||
|
// All non-disabled elements...
|
||||||
|
.filter(el => ! el.hasAttribute('disabled'))
|
||||||
|
},
|
||||||
|
firstFocusable() { return this.focusables()[0] },
|
||||||
|
lastFocusable() { return this.focusables().slice(-1)[0] },
|
||||||
|
nextFocusable() { return this.focusables()[this.nextFocusableIndex()] || this.firstFocusable() },
|
||||||
|
prevFocusable() { return this.focusables()[this.prevFocusableIndex()] || this.lastFocusable() },
|
||||||
|
nextFocusableIndex() { return (this.focusables().indexOf(document.activeElement) + 1) % (this.focusables().length + 1) },
|
||||||
|
prevFocusableIndex() { return Math.max(0, this.focusables().indexOf(document.activeElement)) -1 },
|
||||||
|
}"
|
||||||
|
x-init="$watch('show', value => {
|
||||||
|
if (value) {
|
||||||
|
document.body.classList.add('overflow-y-hidden');
|
||||||
|
{{ $attributes->has('focusable') ? 'setTimeout(() => firstFocusable().focus(), 100)' : '' }}
|
||||||
|
} else {
|
||||||
|
document.body.classList.remove('overflow-y-hidden');
|
||||||
|
}
|
||||||
|
})"
|
||||||
|
x-on:open-modal.window="$event.detail == '{{ $name }}' ? show = true : null"
|
||||||
|
x-on:close-modal.window="$event.detail == '{{ $name }}' ? show = false : null"
|
||||||
|
x-on:close.stop="show = false"
|
||||||
|
x-on:keydown.escape.window="show = false"
|
||||||
|
x-on:keydown.tab.prevent="$event.shiftKey || nextFocusable().focus()"
|
||||||
|
x-on:keydown.shift.tab.prevent="prevFocusable().focus()"
|
||||||
|
x-show="show"
|
||||||
|
class="fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50"
|
||||||
|
style="display: {{ $show ? 'block' : 'none' }};"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
x-show="show"
|
||||||
|
class="fixed inset-0 transform transition-all"
|
||||||
|
x-on:click="show = false"
|
||||||
|
x-transition:enter="ease-out duration-300"
|
||||||
|
x-transition:enter-start="opacity-0"
|
||||||
|
x-transition:enter-end="opacity-100"
|
||||||
|
x-transition:leave="ease-in duration-200"
|
||||||
|
x-transition:leave-start="opacity-100"
|
||||||
|
x-transition:leave-end="opacity-0"
|
||||||
|
>
|
||||||
|
<div class="absolute inset-0 bg-gray-500 dark:bg-gray-900 opacity-75"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
x-show="show"
|
||||||
|
class="mb-6 bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full {{ $maxWidth }} sm:mx-auto"
|
||||||
|
x-transition:enter="ease-out duration-300"
|
||||||
|
x-transition:enter-start="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||||
|
x-transition:enter-end="opacity-100 translate-y-0 sm:scale-100"
|
||||||
|
x-transition:leave="ease-in duration-200"
|
||||||
|
x-transition:leave-start="opacity-100 translate-y-0 sm:scale-100"
|
||||||
|
x-transition:leave-end="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||||
|
>
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
@props(['active'])
|
||||||
|
|
||||||
|
@php
|
||||||
|
$classes = ($active ?? false)
|
||||||
|
? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 dark:border-indigo-600 text-sm font-medium leading-5 text-gray-900 dark:text-gray-100 focus:outline-none focus:border-indigo-700 transition duration-150 ease-in-out'
|
||||||
|
: 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-700 focus:outline-none focus:text-gray-700 dark:focus:text-gray-300 focus:border-gray-300 dark:focus:border-gray-700 transition duration-150 ease-in-out';
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</a>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<button {{ $attributes->merge(['type' => 'submit', 'class' => 'inline-flex items-center px-4 py-2 bg-gray-800 dark:bg-gray-200 border border-transparent rounded-md font-semibold text-xs text-white dark:text-gray-800 uppercase tracking-widest hover:bg-gray-700 dark:hover:bg-white focus:bg-gray-700 dark:focus:bg-white active:bg-gray-900 dark:active:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150']) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</button>
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
@props(['active'])
|
||||||
|
|
||||||
|
@php
|
||||||
|
$classes = ($active ?? false)
|
||||||
|
? 'block w-full ps-3 pe-4 py-2 border-l-4 border-indigo-400 dark:border-indigo-600 text-start text-base font-medium text-indigo-700 dark:text-indigo-300 bg-indigo-50 dark:bg-indigo-900/50 focus:outline-none focus:text-indigo-800 dark:focus:text-indigo-200 focus:bg-indigo-100 dark:focus:bg-indigo-900 focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out'
|
||||||
|
: 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out';
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<a {{ $attributes->merge(['class' => $classes]) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</a>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<button {{ $attributes->merge(['type' => 'button', 'class' => 'inline-flex items-center px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 disabled:opacity-25 transition ease-in-out duration-150']) }}>
|
||||||
|
{{ $slot }}
|
||||||
|
</button>
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
@props(['disabled' => false])
|
||||||
|
|
||||||
|
<input @disabled($disabled) {{ $attributes->merge(['class' => 'border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 focus:border-indigo-500 dark:focus:border-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600 rounded-md shadow-sm']) }}>
|
||||||
|
|
@ -0,0 +1,136 @@
|
||||||
|
<x-app-layout>
|
||||||
|
|
||||||
|
<x-slot name="title">
|
||||||
|
Ringkasan Dashboard
|
||||||
|
</x-slot>
|
||||||
|
|
||||||
|
<div class="max-w-6xl mx-auto">
|
||||||
|
|
||||||
|
<div class="bg-gradient-to-r from-primary to-primary-dark rounded-[20px] p-8 md:p-10 text-white flex flex-col md:flex-row justify-between items-center shadow-lg shadow-primary/20 mb-10 relative overflow-hidden">
|
||||||
|
|
||||||
|
<div class="absolute inset-0 opacity-10" style="background-image:url('https://www.transparenttextures.com/patterns/cubes.png');"></div>
|
||||||
|
|
||||||
|
<div class="relative z-10 mb-6 md:mb-0 text-center md:text-left">
|
||||||
|
<h2 class="font-heading text-2xl md:text-3xl font-bold mb-2">
|
||||||
|
Selamat datang, {{ Auth::user()->name ?? 'Pengguna' }}! 👋
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p class="text-white/80 max-w-lg text-sm md:text-base leading-relaxed">
|
||||||
|
Siap untuk mengecek kualitas ikan hari ini? Sistem klasifikasi AI kami siap memberikan hasil analisis yang akurat dalam hitungan detik.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="relative z-10 shrink-0">
|
||||||
|
<a href="{{ route('klasifikasi') }}"
|
||||||
|
class="inline-flex items-center bg-accent hover:bg-[#00a8af] text-white font-semibold px-6 py-3 rounded-xl transition-all hover:-translate-y-1 shadow-lg shadow-accent/30">
|
||||||
|
<i class="bi bi-camera mr-2"></i> Pindai Ikan Sekarang
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-10">
|
||||||
|
|
||||||
|
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm">
|
||||||
|
<div class="text-gray-500 text-sm font-medium mb-1">Total Pengecekan</div>
|
||||||
|
<div class="text-2xl font-heading font-bold text-gray-900">124</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm">
|
||||||
|
<div class="text-gray-500 text-sm font-medium mb-1">Ikan Segar</div>
|
||||||
|
<div class="text-2xl font-heading font-bold text-green-600">89</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm">
|
||||||
|
<div class="text-gray-500 text-sm font-medium mb-1">Ikan Tidak Segar</div>
|
||||||
|
<div class="text-2xl font-heading font-bold text-red-500">35</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white p-5 rounded-2xl border border-gray-100 shadow-sm">
|
||||||
|
<div class="text-gray-500 text-sm font-medium mb-1">Akurasi AI</div>
|
||||||
|
<div class="text-2xl font-heading font-bold text-primary">98.5%</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="font-heading font-semibold text-lg text-gray-800 mb-4">
|
||||||
|
Akses Cepat
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="grid md:grid-cols-3 gap-6">
|
||||||
|
|
||||||
|
<div class="bg-white p-6 md:p-8 rounded-[20px] border border-gray-100 shadow-sm hover:shadow-[0_15px_30px_rgba(0,0,0,0.06)] hover:border-primary/20 transition-all duration-300 group flex flex-col h-full">
|
||||||
|
|
||||||
|
<div class="w-14 h-14 bg-primary/10 text-primary rounded-2xl flex items-center justify-center text-2xl mb-5">
|
||||||
|
<i class="bi bi-cpu"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 class="text-xl font-heading font-bold text-gray-900 mb-2">
|
||||||
|
Klasifikasi AI
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed mb-6 flex-1">
|
||||||
|
Unggah citra mata ikan dan biarkan algoritma mendeteksi tingkat kesegarannya secara otomatis.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="{{ route('klasifikasi') }}"
|
||||||
|
class="text-primary font-semibold text-sm inline-flex items-center">
|
||||||
|
Buka Fitur
|
||||||
|
<i class="bi bi-arrow-right ml-2"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="bg-white p-6 md:p-8 rounded-[20px] border border-gray-100 shadow-sm hover:shadow-[0_15px_30px_rgba(0,0,0,0.06)] hover:border-primary/20 transition-all duration-300 group flex flex-col h-full">
|
||||||
|
|
||||||
|
<div class="w-14 h-14 bg-accent/10 text-accent rounded-2xl flex items-center justify-center text-2xl mb-5">
|
||||||
|
<i class="bi bi-clock-history"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 class="text-xl font-heading font-bold text-gray-900 mb-2">
|
||||||
|
Riwayat Analisis
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed mb-6 flex-1">
|
||||||
|
Tinjau kembali data dan hasil pengecekan ikan yang telah Anda lakukan sebelumnya.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="{{ route('history') }}"
|
||||||
|
class="text-accent font-semibold text-sm inline-flex items-center">
|
||||||
|
Lihat Riwayat
|
||||||
|
<i class="bi bi-arrow-right ml-2"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="bg-white p-6 md:p-8 rounded-[20px] border border-gray-100 shadow-sm hover:shadow-[0_15px_30px_rgba(0,0,0,0.06)] hover:border-primary/20 transition-all duration-300 group flex flex-col h-full">
|
||||||
|
|
||||||
|
<div class="w-14 h-14 bg-gray-100 text-gray-600 rounded-2xl flex items-center justify-center text-2xl mb-5">
|
||||||
|
<i class="bi bi-person-gear"></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 class="text-xl font-heading font-bold text-gray-900 mb-2">
|
||||||
|
Profil Saya
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed mb-6 flex-1">
|
||||||
|
Perbarui informasi akun dan pengaturan profil Anda.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="{{ route('profile.edit') }}"
|
||||||
|
class="text-gray-600 font-semibold text-sm inline-flex items-center">
|
||||||
|
Kelola Akun
|
||||||
|
<i class="bi bi-arrow-right ml-2"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</x-app-layout>
|
||||||
|
|
@ -0,0 +1,178 @@
|
||||||
|
<x-app-layout>
|
||||||
|
|
||||||
|
<div class="w-full max-w-5xl mx-auto">
|
||||||
|
|
||||||
|
{{-- Header --}}
|
||||||
|
<div class="flex justify-between items-center mb-6 md:mb-10 px-2">
|
||||||
|
<div>
|
||||||
|
<h1 class="text-2xl sm:text-3xl font-heading font-bold text-gray-900">Riwayat Analisis</h1>
|
||||||
|
<p class="text-gray-500 text-sm mt-1">Daftar hasil klasifikasi insang ikan yang pernah kamu lakukan.</p>
|
||||||
|
</div>
|
||||||
|
<a href="{{ route('klasifikasi') }}"
|
||||||
|
class="flex-shrink-0 inline-flex items-center gap-2 bg-primary hover:bg-primary-dark text-white text-sm font-semibold px-5 py-2.5 rounded-xl transition-all shadow-sm hover:shadow-md">
|
||||||
|
<i class="bi bi-cpu"></i>
|
||||||
|
<span class="hidden sm:inline">Analisis Baru</span>
|
||||||
|
<span class="sm:hidden">Analisis Baru</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- MOBILE: Card list --}}
|
||||||
|
<div class="space-y-4 md:hidden">
|
||||||
|
@forelse($histories as $history)
|
||||||
|
<div class="bg-white border border-gray-100 rounded-2xl p-4 shadow-sm">
|
||||||
|
<div class="flex gap-4">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img src="{{ asset('storage/'.$history->image_path) }}"
|
||||||
|
class="w-20 h-20 object-cover rounded-xl border border-gray-100">
|
||||||
|
</div>
|
||||||
|
<div class="flex-1 min-w-0">
|
||||||
|
<div class="flex justify-between items-start mb-2">
|
||||||
|
@if($history->classification->kelas == 'fresh')
|
||||||
|
<span class="inline-flex items-center gap-1 px-2.5 py-1 bg-green-50 text-green-700 border border-green-200 rounded-lg text-xs font-semibold">
|
||||||
|
<i class="bi bi-check-circle-fill"></i>
|
||||||
|
{{ $history->classification->tingkat_kesegaran }}
|
||||||
|
</span>
|
||||||
|
@else
|
||||||
|
<span class="inline-flex items-center gap-1 px-2.5 py-1 bg-red-50 text-red-600 border border-red-200 rounded-lg text-xs font-semibold">
|
||||||
|
<i class="bi bi-x-circle-fill"></i>
|
||||||
|
{{ $history->classification->tingkat_kesegaran }}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
<span class="text-xs text-gray-400 font-medium">
|
||||||
|
#{{ method_exists($histories, 'currentPage') ? ($histories->currentPage() - 1) * $histories->perPage() + $loop->iteration : $loop->iteration }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Progress bar probabilitas --}}
|
||||||
|
<div class="mt-2">
|
||||||
|
<div class="flex justify-between items-center mb-1">
|
||||||
|
<span class="text-xs text-gray-500">Skor Tingkat Kesegaran</span>
|
||||||
|
<span class="text-xs font-semibold text-primary">
|
||||||
|
{{ number_format($history->classification->prob_fresh * 100, 1) }}%
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="w-full bg-gray-100 rounded-full h-1.5 overflow-hidden">
|
||||||
|
<div class="bg-primary h-1.5 rounded-full"
|
||||||
|
style="width: {{ number_format($history->classification->prob_fresh * 100, 1) }}%">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-2 text-xs text-gray-400 flex items-center gap-1">
|
||||||
|
<i class="bi bi-clock"></i>
|
||||||
|
{{ $history->created_at->timezone('Asia/Jakarta')->format('d M Y, H:i') }} WIB
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@empty
|
||||||
|
<div class="text-center py-20">
|
||||||
|
<div class="w-16 h-16 bg-gray-100 rounded-2xl flex items-center justify-center mx-auto mb-4">
|
||||||
|
<i class="bi bi-clock-history text-gray-400 text-2xl"></i>
|
||||||
|
</div>
|
||||||
|
<p class="text-gray-500 font-medium">Belum ada riwayat analisis</p>
|
||||||
|
<p class="text-gray-400 text-sm mt-1">Mulai analisis ikan pertamamu sekarang!</p>
|
||||||
|
<a href="{{ route('klasifikasi') }}"
|
||||||
|
class="inline-flex items-center gap-2 mt-4 bg-primary text-white text-sm font-semibold px-5 py-2.5 rounded-xl hover:bg-primary-dark transition">
|
||||||
|
<i class="bi bi-cpu"></i> Mulai Analisis
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
@endforelse
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- DESKTOP: Table --}}
|
||||||
|
<div class="hidden md:block bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden">
|
||||||
|
|
||||||
|
{{-- Table header info --}}
|
||||||
|
<div class="px-6 py-4 border-b border-gray-100 flex items-center justify-between">
|
||||||
|
<div class="flex items-center gap-2 text-sm text-gray-500">
|
||||||
|
<i class="bi bi-table text-primary/60"></i>
|
||||||
|
<span>Total: <strong class="text-gray-700">{{ $histories->total() ?? $histories->count() }}</strong> analisis</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<table class="w-full text-sm">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg-gray-50 border-b border-gray-100">
|
||||||
|
<th class="px-6 py-3.5 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">No</th>
|
||||||
|
<th class="px-6 py-3.5 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Gambar</th>
|
||||||
|
<th class="px-6 py-3.5 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Tingkat Kesegaran</th>
|
||||||
|
<th class="px-6 py-3.5 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Skor Tingkat Kesegaran</th>
|
||||||
|
<th class="px-6 py-3.5 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider">Tanggal</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-50">
|
||||||
|
@forelse($histories as $history)
|
||||||
|
<tr class="hover:bg-blue-50/30 transition-colors">
|
||||||
|
<td class="px-6 py-4 text-gray-400 font-medium text-xs">
|
||||||
|
#{{ method_exists($histories, 'currentPage') ? ($histories->currentPage() - 1) * $histories->perPage() + $loop->iteration : $loop->iteration }}
|
||||||
|
</td>
|
||||||
|
<td class="px-6 py-4">
|
||||||
|
<img src="{{ asset('storage/'.$history->image_path) }}"
|
||||||
|
class="w-14 h-14 object-cover rounded-xl border border-gray-100 shadow-sm">
|
||||||
|
</td>
|
||||||
|
<td class="px-6 py-4">
|
||||||
|
@if($history->classification->kelas == 'fresh')
|
||||||
|
<span class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-green-50 text-green-700 border border-green-200 rounded-xl text-xs font-semibold">
|
||||||
|
<i class="bi bi-check-circle-fill text-green-500"></i>
|
||||||
|
{{ $history->classification->tingkat_kesegaran }}
|
||||||
|
</span>
|
||||||
|
@else
|
||||||
|
<span class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-red-50 text-red-600 border border-red-200 rounded-xl text-xs font-semibold">
|
||||||
|
<i class="bi bi-x-circle-fill text-red-500"></i>
|
||||||
|
{{ $history->classification->tingkat_kesegaran }}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="px-6 py-4">
|
||||||
|
<div class="flex items-center gap-3">
|
||||||
|
<div class="flex-1 w-24 bg-gray-100 rounded-full h-1.5 overflow-hidden">
|
||||||
|
<div class="bg-primary h-1.5 rounded-full transition-all"
|
||||||
|
style="width: {{ number_format($history->classification->prob_fresh * 100, 1) }}%">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="text-primary font-semibold text-xs min-w-[40px]">
|
||||||
|
{{ number_format($history->classification->prob_fresh * 100, 1) }}%
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="px-6 py-4">
|
||||||
|
<div class="text-gray-700 text-xs font-medium">
|
||||||
|
{{ $history->created_at->timezone('Asia/Jakarta')->format('d M Y') }}
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-400 text-xs mt-0.5">
|
||||||
|
{{ $history->created_at->timezone('Asia/Jakarta')->format('H:i') }} WIB
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@empty
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="text-center py-20">
|
||||||
|
<div class="w-16 h-16 bg-gray-100 rounded-2xl flex items-center justify-center mx-auto mb-4">
|
||||||
|
<i class="bi bi-clock-history text-gray-400 text-2xl"></i>
|
||||||
|
</div>
|
||||||
|
<p class="text-gray-500 font-medium">Belum ada riwayat analisis</p>
|
||||||
|
<p class="text-gray-400 text-sm mt-1">Mulai analisis ikan pertamamu sekarang!</p>
|
||||||
|
<a href="{{ route('klasifikasi') }}"
|
||||||
|
class="inline-flex items-center gap-2 mt-4 bg-primary text-white text-sm font-semibold px-5 py-2.5 rounded-xl hover:bg-primary-dark transition">
|
||||||
|
<i class="bi bi-cpu"></i> Mulai Analisis
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Pagination --}}
|
||||||
|
@if(method_exists($histories, 'links') && $histories->hasPages())
|
||||||
|
<div class="mt-6 px-2">
|
||||||
|
{{ $histories->links() }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</x-app-layout>
|
||||||
|
|
@ -0,0 +1,287 @@
|
||||||
|
<x-app-layout>
|
||||||
|
|
||||||
|
<div class="w-full max-w-3xl mx-auto">
|
||||||
|
|
||||||
|
<div class="text-center mb-6 md:mb-10 px-2">
|
||||||
|
<h1 class="text-2xl sm:text-3xl md:text-4xl font-heading font-bold text-gray-900 mb-2 md:mb-4">
|
||||||
|
Cek Kesegaran Ikan Anda
|
||||||
|
</h1>
|
||||||
|
<p class="text-gray-500 text-sm md:text-lg max-w-xl mx-auto">
|
||||||
|
Unggah foto insang ikan dengan pencahayaan yang baik, dan biarkan teknologi AI kami menganalisis kualitasnya secara real-time.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- PANDUAN UPLOAD --}}
|
||||||
|
<div class="mb-6 md:mb-8">
|
||||||
|
<div class="bg-gradient-to-br from-blue-50 to-cyan-50 border border-blue-100 rounded-2xl p-5 md:p-8">
|
||||||
|
<h3 class="font-heading font-bold text-gray-800 text-base md:text-lg mb-4 flex items-center">
|
||||||
|
<i class="bi bi-info-circle-fill text-primary mr-2"></i>
|
||||||
|
Panduan Pengambilan Foto
|
||||||
|
</h3>
|
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 items-center">
|
||||||
|
<ul class="space-y-3">
|
||||||
|
<li class="flex items-start text-sm text-gray-600">
|
||||||
|
<span class="flex-shrink-0 w-6 h-6 bg-green-100 text-green-600 rounded-full flex items-center justify-center mr-3 mt-0.5">
|
||||||
|
<i class="bi bi-check text-xs font-bold"></i>
|
||||||
|
</span>
|
||||||
|
<span><strong class="text-gray-800">Fokus ke area insang</strong> — buka tutup insang ikan dan foto langsung ke bagian merah/merah muda.</span>
|
||||||
|
</li>
|
||||||
|
<li class="flex items-start text-sm text-gray-600">
|
||||||
|
<span class="flex-shrink-0 w-6 h-6 bg-green-100 text-green-600 rounded-full flex items-center justify-center mr-3 mt-0.5">
|
||||||
|
<i class="bi bi-check text-xs font-bold"></i>
|
||||||
|
</span>
|
||||||
|
<span><strong class="text-gray-800">Pencahayaan cukup</strong> — gunakan cahaya alami atau lampu terang, hindari foto gelap atau berbayang.</span>
|
||||||
|
</li>
|
||||||
|
<li class="flex items-start text-sm text-gray-600">
|
||||||
|
<span class="flex-shrink-0 w-6 h-6 bg-green-100 text-green-600 rounded-full flex items-center justify-center mr-3 mt-0.5">
|
||||||
|
<i class="bi bi-check text-xs font-bold"></i>
|
||||||
|
</span>
|
||||||
|
<span><strong class="text-gray-800">Jarak dekat</strong> — ambil foto sedekat mungkin agar detail insang terlihat jelas.</span>
|
||||||
|
</li>
|
||||||
|
<li class="flex items-start text-sm text-gray-600">
|
||||||
|
<span class="flex-shrink-0 w-6 h-6 bg-red-100 text-red-500 rounded-full flex items-center justify-center mr-3 mt-0.5">
|
||||||
|
<i class="bi bi-x text-xs font-bold"></i>
|
||||||
|
</span>
|
||||||
|
<span><strong class="text-gray-800">Hindari foto buram</strong> atau terlalu jauh sehingga insang tidak terlihat jelas.</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="flex flex-row gap-3">
|
||||||
|
<div class="flex-1 rounded-xl overflow-hidden border-2 border-green-200 shadow-sm">
|
||||||
|
<div class="bg-green-500 py-1.5 text-center">
|
||||||
|
<span class="text-[10px] font-bold text-white uppercase tracking-wider">
|
||||||
|
<i class="bi bi-check-circle mr-1"></i> Contoh Benar
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<img src={{ asset('images/Insang-Benar.jpeg') }} alt="Contoh foto insang yang benar" class="w-full h-32 object-cover">
|
||||||
|
<div class="bg-green-50 px-2 py-1.5 w-full">
|
||||||
|
<p class="text-[9px] text-green-700 font-medium text-center w-full">Insang jelas, pencahayaan baik</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1 rounded-xl overflow-hidden border-2 border-red-200 shadow-sm">
|
||||||
|
<div class="bg-red-500 py-1.5 text-center">
|
||||||
|
<span class="text-[10px] font-bold text-white uppercase tracking-wider">
|
||||||
|
<i class="bi bi-x-circle mr-1"></i> Contoh Salah
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<img src={{ asset('images/Insang-Salah.jpeg') }} alt="Contoh foto insang yang salah" class="w-full h-32 object-cover">
|
||||||
|
<div class="bg-red-50 px-2 py-1.5 w-full">
|
||||||
|
<p class="text-[9px] text-red-600 font-medium text-center w-full">Gelap, buram, bukan insang</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white rounded-2xl md:rounded-3xl shadow-xl shadow-blue-900/5 p-5 sm:p-6 md:p-12 border border-gray-100">
|
||||||
|
|
||||||
|
<form action="{{ route('klasifikasi.store') }}" method="POST" enctype="multipart/form-data" class="space-y-5 md:space-y-8">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<label class="relative flex flex-col items-center justify-center w-full min-h-[220px] md:min-h-[300px] border-2 border-dashed border-gray-300 rounded-2xl bg-gray-50/50 hover:bg-blue-50 hover:border-blue-400 transition-all cursor-pointer overflow-hidden group p-4">
|
||||||
|
<div id="upload-prompt" class="flex flex-col items-center justify-center text-center transition-all duration-300 group-hover:scale-105">
|
||||||
|
<div class="w-14 h-14 md:w-20 md:h-20 bg-white rounded-full shadow-sm flex items-center justify-center mb-4 md:mb-6 text-blue-500">
|
||||||
|
<i class="bi bi-cloud-arrow-up text-2xl md:text-4xl"></i>
|
||||||
|
</div>
|
||||||
|
<p class="mb-1 md:mb-2 text-base md:text-lg text-gray-700">
|
||||||
|
<span class="font-bold text-blue-600">Klik untuk memilih gambar</span> <span class="hidden sm:inline">atau seret ke sini</span>
|
||||||
|
</p>
|
||||||
|
<p class="text-xs md:text-sm text-gray-400 font-medium">PNG, JPG, JPEG (Maks. 2MB)</p>
|
||||||
|
</div>
|
||||||
|
<img id="image-preview" class="hidden absolute inset-0 w-full h-full object-contain p-2 md:p-4 bg-gray-50/50 backdrop-blur-sm" src="" alt="Preview Gambar">
|
||||||
|
<input type="file" name="image" accept="image/png, image/jpeg, image/jpg" class="hidden" required onchange="previewImage(this)">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
@error('image')
|
||||||
|
<div class="text-red-500 text-xs md:text-sm font-medium pl-2 -mt-2 md:-mt-4">
|
||||||
|
<i class="bi bi-exclamation-circle mr-1"></i> {{ $message }}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
|
|
||||||
|
<button type="submit" class="w-full bg-primary hover:bg-primary-dark text-white font-bold py-3 md:py-4 rounded-xl md:rounded-2xl text-base md:text-lg transition-all shadow-md hover:shadow-lg flex items-center justify-center">
|
||||||
|
<i class="bi bi-stars mr-2"></i> Analisis Gambar
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{{-- ===================== HASIL KLASIFIKASI BERHASIL ===================== --}}
|
||||||
|
@if(session('kelas'))
|
||||||
|
<div class="mt-8 md:mt-12 pt-6 md:pt-10 border-t-2 border-dashed border-gray-100 animate-fade-in-up">
|
||||||
|
<div class="flex items-center justify-center mb-6 md:mb-8">
|
||||||
|
<span class="bg-gray-100 text-gray-500 px-3 py-1 md:px-4 md:py-1.5 rounded-full text-xs md:text-sm font-bold tracking-widest uppercase">
|
||||||
|
Hasil Analisis
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col md:flex-row items-stretch gap-5 md:gap-8 bg-white md:p-2">
|
||||||
|
|
||||||
|
<div class="shrink-0 flex flex-row md:flex-col gap-3 md:gap-4">
|
||||||
|
@if(session('image_url'))
|
||||||
|
<div class="flex-1 md:flex-none rounded-xl md:rounded-2xl overflow-hidden bg-gray-100 border border-gray-200 shadow-sm">
|
||||||
|
<div class="bg-gray-200 py-1.5 text-center border-b border-gray-300">
|
||||||
|
<span class="text-[10px] md:text-xs font-bold text-gray-600 uppercase tracking-wider">Gambar Asli</span>
|
||||||
|
</div>
|
||||||
|
<img src="{{ session('image_url') }}" class="w-full md:w-48 h-36 md:h-40 object-cover">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(session('cropped_image'))
|
||||||
|
<div class="flex-1 md:flex-none rounded-xl md:rounded-2xl overflow-hidden bg-gray-50 border border-gray-200 shadow-sm">
|
||||||
|
<div class="bg-gray-100 py-1.5 text-center border-b border-gray-200">
|
||||||
|
<span class="text-[10px] md:text-xs font-bold text-gray-600 uppercase tracking-wider">
|
||||||
|
<i class="bi bi-crop mr-1"></i> Hasil Crop
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<img src="data:image/jpeg;base64,{{ session('cropped_image') }}" class="w-full md:w-48 h-36 md:h-40 object-cover">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex-1 flex flex-col justify-center w-full space-y-4 md:space-y-6">
|
||||||
|
@if(session('tingkat_kesegaran'))
|
||||||
|
<div>
|
||||||
|
<p class="text-gray-400 text-[10px] md:text-xs font-bold uppercase tracking-widest mb-2 md:mb-3">Status Kesegaran</p>
|
||||||
|
@if(strtolower(session('kelas')) == 'segar' || strtolower(session('kelas')) == 'fresh')
|
||||||
|
<div class="inline-flex items-center px-4 py-2.5 md:px-5 md:py-3 bg-green-50 text-green-700 rounded-xl font-bold text-base md:text-lg border border-green-200 shadow-sm">
|
||||||
|
<i class="bi bi-check-circle-fill text-xl md:text-2xl mr-2 md:mr-3"></i>
|
||||||
|
{{ session('tingkat_kesegaran') }}
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="inline-flex items-center px-4 py-2.5 md:px-5 md:py-3 bg-red-50 text-red-700 rounded-xl font-bold text-base md:text-lg border border-red-200 shadow-sm">
|
||||||
|
<i class="bi bi-x-circle-fill text-xl md:text-2xl mr-2 md:mr-3"></i>
|
||||||
|
{{ session('tingkat_kesegaran') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="w-full">
|
||||||
|
<div class="p-3 md:p-4 bg-gray-50 rounded-xl border border-gray-100 mb-4 md:mb-5">
|
||||||
|
<p class="text-[10px] md:text-xs text-gray-500 font-bold uppercase tracking-wider mb-1 md:mb-2">
|
||||||
|
<i class="bi bi-eye mr-1 text-primary"></i> Catatan Visual
|
||||||
|
</p>
|
||||||
|
@if(strtolower(session('kelas')) == 'segar' || strtolower(session('kelas')) == 'fresh')
|
||||||
|
<p class="text-xs md:text-sm text-gray-700 leading-relaxed">
|
||||||
|
Berdasarkan analisis visual, fitur pada insang ikan ini menunjukkan ciri-ciri <strong>dalam kondisi baik</strong>.
|
||||||
|
</p>
|
||||||
|
@else
|
||||||
|
<p class="text-xs md:text-sm text-gray-700 leading-relaxed">
|
||||||
|
Berdasarkan analisis visual, terdeteksi <strong>ciri-ciri penurunan kualitas</strong> pada insang ikan (seperti warna yang cenderung memucat atau menggelap).
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex justify-between items-end mb-1.5 md:mb-2">
|
||||||
|
<p class="text-[10px] md:text-xs text-gray-500 font-semibold uppercase tracking-wide">Skor Tingkat Kesegaran</p>
|
||||||
|
<p class="text-xs md:text-sm text-primary font-bold">
|
||||||
|
{{ is_float(session('prob_fresh')) && session('prob_fresh') <= 1 ? number_format(session('prob_fresh') * 100, 1) : number_format(session('prob_fresh'), 1) }}%
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="w-full bg-gray-100 rounded-full h-2 md:h-2.5 overflow-hidden">
|
||||||
|
<div class="bg-primary h-2 md:h-2.5 rounded-full transition-all duration-1000 ease-out"
|
||||||
|
style="width: {{ floatval(session('prob_fresh')) > 1 ? floatval(session('prob_fresh')) : floatval(session('prob_fresh')) * 100 }}%">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- ===================== GAMBAR TERTOLAK (BUKAN INSANG) ===================== --}}
|
||||||
|
@if(session('error_insang'))
|
||||||
|
<div class="mt-8 md:mt-12 pt-6 md:pt-10 border-t-2 border-dashed border-gray-100 animate-fade-in-up">
|
||||||
|
<div class="flex items-center justify-center mb-6 md:mb-8">
|
||||||
|
<span class="bg-red-50 text-red-500 px-3 py-1 md:px-4 md:py-1.5 rounded-full text-xs md:text-sm font-bold tracking-widest uppercase border border-red-200">
|
||||||
|
<i class="bi bi-x-circle mr-1"></i> Gambar Ditolak
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col md:flex-row items-stretch gap-5 md:gap-8">
|
||||||
|
|
||||||
|
{{-- Gambar yang diupload tetap ditampilkan --}}
|
||||||
|
@if(session('image_url'))
|
||||||
|
<div class="shrink-0">
|
||||||
|
<div class="rounded-xl md:rounded-2xl overflow-hidden border-2 border-red-200 shadow-sm">
|
||||||
|
<div class="bg-red-100 py-1.5 text-center border-b border-red-200">
|
||||||
|
<span class="text-[10px] md:text-xs font-bold text-red-600 uppercase tracking-wider">
|
||||||
|
<i class="bi bi-image mr-1"></i> Gambar Diupload
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<img src="{{ session('image_url') }}" class="w-full md:w-48 h-36 md:h-40 object-cover">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Pop up pesan penolakan --}}
|
||||||
|
<div class="flex-1 flex flex-col justify-center">
|
||||||
|
<div class="bg-red-50 border border-red-200 rounded-2xl p-5 md:p-6">
|
||||||
|
<div class="flex items-start gap-4">
|
||||||
|
<div class="w-12 h-12 bg-red-100 rounded-xl flex items-center justify-center flex-shrink-0">
|
||||||
|
<i class="bi bi-shield-x text-red-500 text-2xl"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4 class="font-heading font-bold text-red-700 text-base md:text-lg mb-2">
|
||||||
|
Objek Bukan Insang Ikan
|
||||||
|
</h4>
|
||||||
|
<p class="text-red-600 text-sm leading-relaxed mb-4">
|
||||||
|
{{ session('error_insang') }}
|
||||||
|
</p>
|
||||||
|
<div class="bg-white border border-red-100 rounded-xl p-3 md:p-4">
|
||||||
|
<p class="text-[10px] md:text-xs text-gray-500 font-bold uppercase tracking-wider mb-2">
|
||||||
|
<i class="bi bi-lightbulb text-yellow-500 mr-1"></i> Saran
|
||||||
|
</p>
|
||||||
|
<ul class="space-y-1.5 text-xs md:text-sm text-gray-600">
|
||||||
|
<li class="flex items-start gap-2">
|
||||||
|
<i class="bi bi-arrow-right text-primary mt-0.5 flex-shrink-0"></i>
|
||||||
|
Pastikan foto menampilkan area insang ikan secara jelas
|
||||||
|
</li>
|
||||||
|
<li class="flex items-start gap-2">
|
||||||
|
<i class="bi bi-arrow-right text-primary mt-0.5 flex-shrink-0"></i>
|
||||||
|
Buka tutup insang ikan sebelum mengambil foto
|
||||||
|
</li>
|
||||||
|
<li class="flex items-start gap-2">
|
||||||
|
<i class="bi bi-arrow-right text-primary mt-0.5 flex-shrink-0"></i>
|
||||||
|
Gunakan pencahayaan yang cukup agar warna insang terlihat jelas
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@keyframes fadeInUp {
|
||||||
|
from { opacity: 0; transform: translateY(10px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
.animate-fade-in-up {
|
||||||
|
animation: fadeInUp 0.5s ease-out forwards;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function previewImage(input) {
|
||||||
|
const preview = document.getElementById('image-preview');
|
||||||
|
const prompt = document.getElementById('upload-prompt');
|
||||||
|
if (input.files && input.files[0]) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = function(e) {
|
||||||
|
preview.src = e.target.result;
|
||||||
|
preview.classList.remove('hidden');
|
||||||
|
prompt.classList.add('opacity-0');
|
||||||
|
setTimeout(() => prompt.classList.add('hidden'), 300);
|
||||||
|
}
|
||||||
|
reader.readAsDataURL(input.files[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</x-app-layout>
|
||||||
|
|
@ -0,0 +1,193 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>{{ $title ?? 'FiFreshChecker | AI Fish Freshness' }}</title>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'sans-serif'],
|
||||||
|
heading: ['Poppins', 'sans-serif']
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
primary: '#0A66C2',
|
||||||
|
'primary-dark': '#004182',
|
||||||
|
accent: '#00C4CC'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="font-sans bg-gray-50 flex flex-col h-screen overflow-hidden selection:bg-primary selection:text-white">
|
||||||
|
|
||||||
|
<header class="bg-white border-b border-gray-100 z-50 shadow-sm shrink-0 relative">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="flex justify-between items-center h-20">
|
||||||
|
|
||||||
|
{{-- Logo --}}
|
||||||
|
<div class="flex-shrink-0 flex items-center">
|
||||||
|
@guest
|
||||||
|
<a href="{{ route('home') }}" class="font-heading font-bold text-2xl text-primary flex items-center gap-2 transition hover:opacity-80">
|
||||||
|
<i class="bi bi-droplet-half text-accent text-3xl"></i>
|
||||||
|
FiFreshChecker
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<span class="font-heading font-bold text-2xl text-primary flex items-center gap-2 select-none cursor-default">
|
||||||
|
<i class="bi bi-droplet-half text-accent text-3xl"></i>
|
||||||
|
FiFreshChecker
|
||||||
|
</span>
|
||||||
|
@endguest
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Desktop Nav --}}
|
||||||
|
<nav class="hidden md:flex items-center gap-1">
|
||||||
|
@guest
|
||||||
|
<a href="{{ route('home') }}"
|
||||||
|
class="{{ request()->routeIs('home') ? 'text-primary font-semibold bg-primary/5' : 'text-gray-600 hover:text-primary hover:bg-gray-100' }} px-4 py-2 rounded-lg font-medium transition-colors text-sm">
|
||||||
|
Beranda
|
||||||
|
</a>
|
||||||
|
@endguest
|
||||||
|
|
||||||
|
<a href="{{ route('klasifikasi') }}"
|
||||||
|
class="{{ request()->routeIs('klasifikasi') ? 'text-primary bg-primary/10' : 'text-gray-600 hover:text-primary hover:bg-gray-100' }} px-4 py-2 rounded-lg font-medium transition-colors text-sm flex items-center gap-1.5">
|
||||||
|
<i class="bi bi-cpu"></i> Klasifikasi AI
|
||||||
|
</a>
|
||||||
|
|
||||||
|
@auth
|
||||||
|
<a href="{{ route('history.index') }}"
|
||||||
|
class="{{ request()->routeIs('history.*') ? 'text-primary bg-primary/10' : 'text-gray-600 hover:text-primary hover:bg-gray-100' }} px-4 py-2 rounded-lg font-medium transition-colors text-sm flex items-center gap-1.5">
|
||||||
|
<i class="bi bi-clock-history"></i> Riwayat
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="w-px h-5 bg-gray-200 mx-1"></div>
|
||||||
|
|
||||||
|
{{-- Dropdown user --}}
|
||||||
|
<div class="relative">
|
||||||
|
<button id="user-dropdown-btn"
|
||||||
|
class="flex items-center gap-1.5 text-sm text-gray-600 hover:text-primary hover:bg-gray-100 px-4 py-2 rounded-lg font-medium transition-colors">
|
||||||
|
<i class="bi bi-person-circle text-primary"></i>
|
||||||
|
{{ Auth::user()->name }}
|
||||||
|
<i id="user-chevron" class="bi bi-chevron-down text-xs transition-transform duration-200"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="user-dropdown-menu"
|
||||||
|
class="hidden absolute right-0 mt-2 w-48 bg-white border border-gray-100 rounded-xl shadow-lg py-1 z-50">
|
||||||
|
<div class="px-4 py-2 border-b border-gray-100">
|
||||||
|
<p class="text-xs text-gray-400">Masuk sebagai</p>
|
||||||
|
<p class="text-sm font-semibold text-gray-700 truncate">{{ Auth::user()->name }}</p>
|
||||||
|
</div>
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full text-left px-4 py-2 text-sm text-red-500 hover:bg-red-50 flex items-center gap-2 rounded-lg">
|
||||||
|
<i class="bi bi-box-arrow-right"></i> Keluar
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="w-px h-5 bg-gray-200 mx-2"></div>
|
||||||
|
<a href="{{ route('login') }}"
|
||||||
|
class="text-gray-600 hover:text-primary hover:bg-gray-100 px-4 py-2 rounded-lg font-medium transition-colors text-sm flex items-center gap-1.5">
|
||||||
|
<i class="bi bi-person"></i> Masuk
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('register') }}"
|
||||||
|
class="bg-primary hover:bg-primary-dark text-white px-5 py-2 rounded-lg font-semibold transition-all text-sm shadow-sm hover:shadow-md flex items-center gap-1.5">
|
||||||
|
<i class="bi bi-person-plus"></i> Daftar
|
||||||
|
</a>
|
||||||
|
@endauth
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{{-- Hamburger --}}
|
||||||
|
<div class="md:hidden flex items-center">
|
||||||
|
<button id="mobile-menu-btn" class="text-gray-600 hover:text-primary focus:outline-none p-1">
|
||||||
|
<i id="mobile-menu-icon" class="bi bi-list text-3xl"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Mobile Menu --}}
|
||||||
|
<div id="mobile-menu" class="hidden md:hidden bg-white border-t border-gray-100 px-4 pt-3 pb-4 space-y-2 shadow-lg absolute w-full z-50">
|
||||||
|
|
||||||
|
<a href="{{ route('klasifikasi') }}" class="block px-3 py-2 rounded-lg text-sm font-medium {{ request()->routeIs('klasifikasi') ? 'text-primary bg-primary/10' : 'text-gray-700 hover:text-primary hover:bg-gray-50' }} flex items-center gap-2">
|
||||||
|
<i class="bi bi-cpu"></i> Klasifikasi AI
|
||||||
|
</a>
|
||||||
|
|
||||||
|
@auth
|
||||||
|
<a href="{{ route('history.index') }}" class="block px-3 py-2 rounded-lg text-sm font-medium {{ request()->routeIs('history.*') ? 'text-primary bg-primary/10' : 'text-gray-700 hover:text-primary hover:bg-gray-50' }} flex items-center gap-2">
|
||||||
|
<i class="bi bi-clock-history text-primary/60"></i> Riwayat Klasifikasi
|
||||||
|
</a>
|
||||||
|
<div class="border-t border-gray-100 pt-2 mt-1">
|
||||||
|
<div class="px-3 py-1.5 text-xs text-gray-400 flex items-center gap-1.5">
|
||||||
|
<i class="bi bi-person-circle text-primary"></i>
|
||||||
|
{{ Auth::user()->name }}
|
||||||
|
</div>
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
<button type="submit" class="w-full text-left px-3 py-2 rounded-lg text-sm font-medium text-red-500 hover:bg-red-50 flex items-center gap-2">
|
||||||
|
<i class="bi bi-box-arrow-right"></i> Keluar
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="border-t border-gray-100 pt-2 mt-1 space-y-2">
|
||||||
|
<a href="{{ route('login') }}" class="block px-3 py-2 rounded-lg text-sm font-medium text-gray-700 hover:text-primary hover:bg-gray-50 flex items-center gap-2 border border-gray-200">
|
||||||
|
<i class="bi bi-person text-primary/60"></i> Masuk
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('register') }}" class="block px-3 py-2 rounded-lg text-sm font-semibold text-white bg-primary hover:bg-primary-dark flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-person-plus"></i> Daftar Sekarang
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="flex-1 overflow-y-auto w-full py-10 px-4 sm:px-6 lg:px-8 flex flex-col items-center">
|
||||||
|
{{ $slot }}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="bg-white border-t border-gray-100 py-6 shrink-0">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 text-center text-sm text-gray-500">
|
||||||
|
© 2026 <span class="font-semibold text-gray-700">FiFreshChecker</span>. Inovasi Teknologi untuk Kualitas Pangan.
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const mobileBtn = document.getElementById('mobile-menu-btn');
|
||||||
|
const mobileMenu = document.getElementById('mobile-menu');
|
||||||
|
const mobileIcon = document.getElementById('mobile-menu-icon');
|
||||||
|
|
||||||
|
mobileBtn.addEventListener('click', function () {
|
||||||
|
mobileMenu.classList.toggle('hidden');
|
||||||
|
mobileIcon.classList.toggle('bi-list');
|
||||||
|
mobileIcon.classList.toggle('bi-x-lg');
|
||||||
|
});
|
||||||
|
|
||||||
|
const dropdownBtn = document.getElementById('user-dropdown-btn');
|
||||||
|
const dropdownMenu = document.getElementById('user-dropdown-menu');
|
||||||
|
const chevron = document.getElementById('user-chevron');
|
||||||
|
|
||||||
|
if (dropdownBtn) {
|
||||||
|
dropdownBtn.addEventListener('click', function (e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
dropdownMenu.classList.toggle('hidden');
|
||||||
|
chevron.classList.toggle('rotate-180');
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener('click', function () {
|
||||||
|
dropdownMenu.classList.add('hidden');
|
||||||
|
chevron.classList.remove('rotate-180');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||||
|
|
||||||
|
<!-- Fonts -->
|
||||||
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||||
|
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||||
|
|
||||||
|
<!-- Scripts -->
|
||||||
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||||
|
</head>
|
||||||
|
<body class="font-sans text-gray-900 antialiased">
|
||||||
|
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900">
|
||||||
|
<div>
|
||||||
|
<a href="/">
|
||||||
|
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">
|
||||||
|
{{ $slot }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
<nav x-data="{ open: false }" class="bg-white dark:bg-gray-800 border-b border-gray-100 dark:border-gray-700">
|
||||||
|
<!-- Primary Navigation Menu -->
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="flex justify-between h-16">
|
||||||
|
<div class="flex">
|
||||||
|
<!-- Logo -->
|
||||||
|
<div class="shrink-0 flex items-center">
|
||||||
|
<a href="{{ route('dashboard') }}">
|
||||||
|
<x-application-logo class="block h-9 w-auto fill-current text-gray-800 dark:text-gray-200" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Navigation Links -->
|
||||||
|
<div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
|
||||||
|
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||||
|
{{ __('Dashboard') }}
|
||||||
|
</x-nav-link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Settings Dropdown -->
|
||||||
|
<div class="hidden sm:flex sm:items-center sm:ms-6">
|
||||||
|
<x-dropdown align="right" width="48">
|
||||||
|
<x-slot name="trigger">
|
||||||
|
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none transition ease-in-out duration-150">
|
||||||
|
<div>{{ Auth::user()->name }}</div>
|
||||||
|
|
||||||
|
<div class="ms-1">
|
||||||
|
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
||||||
|
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</x-slot>
|
||||||
|
|
||||||
|
<x-slot name="content">
|
||||||
|
<x-dropdown-link :href="route('profile.edit')">
|
||||||
|
{{ __('Profile') }}
|
||||||
|
</x-dropdown-link>
|
||||||
|
|
||||||
|
<!-- Authentication -->
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<x-dropdown-link :href="route('logout')"
|
||||||
|
onclick="event.preventDefault();
|
||||||
|
this.closest('form').submit();">
|
||||||
|
{{ __('Log Out') }}
|
||||||
|
</x-dropdown-link>
|
||||||
|
</form>
|
||||||
|
</x-slot>
|
||||||
|
</x-dropdown>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Hamburger -->
|
||||||
|
<div class="-me-2 flex items-center sm:hidden">
|
||||||
|
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-900 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-500 dark:focus:text-gray-400 transition duration-150 ease-in-out">
|
||||||
|
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
|
||||||
|
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
||||||
|
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Responsive Navigation Menu -->
|
||||||
|
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
|
||||||
|
<div class="pt-2 pb-3 space-y-1">
|
||||||
|
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
||||||
|
{{ __('Dashboard') }}
|
||||||
|
</x-responsive-nav-link>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Responsive Settings Options -->
|
||||||
|
<div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-600">
|
||||||
|
<div class="px-4">
|
||||||
|
<div class="font-medium text-base text-gray-800 dark:text-gray-200">{{ Auth::user()->name }}</div>
|
||||||
|
<div class="font-medium text-sm text-gray-500">{{ Auth::user()->email }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-3 space-y-1">
|
||||||
|
<x-responsive-nav-link :href="route('profile.edit')">
|
||||||
|
{{ __('Profile') }}
|
||||||
|
</x-responsive-nav-link>
|
||||||
|
|
||||||
|
<!-- Authentication -->
|
||||||
|
<form method="POST" action="{{ route('logout') }}">
|
||||||
|
@csrf
|
||||||
|
|
||||||
|
<x-responsive-nav-link :href="route('logout')"
|
||||||
|
onclick="event.preventDefault();
|
||||||
|
this.closest('form').submit();">
|
||||||
|
{{ __('Log Out') }}
|
||||||
|
</x-responsive-nav-link>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<x-app-layout>
|
||||||
|
<x-slot name="header">
|
||||||
|
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||||
|
{{ __('Profil Saya') }}
|
||||||
|
</h2>
|
||||||
|
</x-slot>
|
||||||
|
|
||||||
|
<div class="py-12">
|
||||||
|
<div class="max-w-2xl mx-auto sm:px-6 lg:px-8">
|
||||||
|
@include('profile.partials.update-profile-information-form')
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</x-app-layout>
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<section class="space-y-6">
|
||||||
|
<header>
|
||||||
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||||
|
{{ __('Delete Account') }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }}
|
||||||
|
</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<x-danger-button
|
||||||
|
x-data=""
|
||||||
|
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')"
|
||||||
|
>{{ __('Delete Account') }}</x-danger-button>
|
||||||
|
|
||||||
|
<x-modal name="confirm-user-deletion" :show="$errors->userDeletion->isNotEmpty()" focusable>
|
||||||
|
<form method="post" action="{{ route('profile.destroy') }}" class="p-6">
|
||||||
|
@csrf
|
||||||
|
@method('delete')
|
||||||
|
|
||||||
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||||
|
{{ __('Are you sure you want to delete your account?') }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
{{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="mt-6">
|
||||||
|
<x-input-label for="password" value="{{ __('Password') }}" class="sr-only" />
|
||||||
|
|
||||||
|
<x-text-input
|
||||||
|
id="password"
|
||||||
|
name="password"
|
||||||
|
type="password"
|
||||||
|
class="mt-1 block w-3/4"
|
||||||
|
placeholder="{{ __('Password') }}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<x-input-error :messages="$errors->userDeletion->get('password')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-6 flex justify-end">
|
||||||
|
<x-secondary-button x-on:click="$dispatch('close')">
|
||||||
|
{{ __('Cancel') }}
|
||||||
|
</x-secondary-button>
|
||||||
|
|
||||||
|
<x-danger-button class="ms-3">
|
||||||
|
{{ __('Delete Account') }}
|
||||||
|
</x-danger-button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</x-modal>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<section>
|
||||||
|
<header>
|
||||||
|
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||||
|
{{ __('Update Password') }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||||
|
{{ __('Ensure your account is using a long, random password to stay secure.') }}
|
||||||
|
</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6">
|
||||||
|
@csrf
|
||||||
|
@method('put')
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<x-input-label for="update_password_current_password" :value="__('Current Password')" />
|
||||||
|
<x-text-input id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
|
||||||
|
<x-input-error :messages="$errors->updatePassword->get('current_password')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<x-input-label for="update_password_password" :value="__('New Password')" />
|
||||||
|
<x-text-input id="update_password_password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
|
||||||
|
<x-input-error :messages="$errors->updatePassword->get('password')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<x-input-label for="update_password_password_confirmation" :value="__('Confirm Password')" />
|
||||||
|
<x-text-input id="update_password_password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
|
||||||
|
<x-input-error :messages="$errors->updatePassword->get('password_confirmation')" class="mt-2" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center gap-4">
|
||||||
|
<x-primary-button>{{ __('Save') }}</x-primary-button>
|
||||||
|
|
||||||
|
@if (session('status') === 'password-updated')
|
||||||
|
<p
|
||||||
|
x-data="{ show: true }"
|
||||||
|
x-show="show"
|
||||||
|
x-transition
|
||||||
|
x-init="setTimeout(() => show = false, 2000)"
|
||||||
|
class="text-sm text-gray-600 dark:text-gray-400"
|
||||||
|
>{{ __('Saved.') }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
<section class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||||
|
|
||||||
|
<div class="bg-slate-50 border-b border-gray-100 px-6 py-8 flex flex-col items-center text-center">
|
||||||
|
<div class="h-20 w-20 rounded-full bg-blue-600 flex items-center justify-center text-white text-3xl font-bold shadow-sm">
|
||||||
|
{{ strtoupper(substr($user->name, 0, 1)) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2 class="mt-4 text-xl font-bold text-gray-900">
|
||||||
|
Informasi Profil
|
||||||
|
</h2>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">
|
||||||
|
Kelola informasi data diri Anda. Pastikan nama lengkap sesuai.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-6 md:p-8">
|
||||||
|
<form method="post" action="{{ route('profile.update') }}" class="space-y-6">
|
||||||
|
@csrf
|
||||||
|
@method('patch')
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="name" class="block text-sm font-semibold text-gray-700 mb-2">Nama Lengkap</label>
|
||||||
|
<input id="name" name="name" type="text"
|
||||||
|
class="block w-full border-gray-300 rounded-none shadow-sm focus:border-blue-500 focus:ring focus:ring-blue-200 transition"
|
||||||
|
value="{{ old('name', $user->name) }}" required autofocus autocomplete="name">
|
||||||
|
<x-input-error class="mt-2 text-sm text-red-600" :messages="$errors->get('name')" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="email" class="block text-sm font-semibold text-gray-700 mb-2">Alamat Email</label>
|
||||||
|
<div class="relative">
|
||||||
|
<input id="email" name="email" type="email"
|
||||||
|
class="block w-full border-gray-200 bg-gray-50 rounded-md text-gray-500 shadow-sm cursor-not-allowed focus:ring-0"
|
||||||
|
value="{{ old('email', $user->email) }}" readonly>
|
||||||
|
|
||||||
|
<div class="absolute inset-y-0 right-0 flex items-center pr-4">
|
||||||
|
<i class="bi bi-lock-fill text-gray-400"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center justify-between pt-6 mt-8 border-t border-gray-100">
|
||||||
|
<div>
|
||||||
|
@if (session('status') === 'profile-updated')
|
||||||
|
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 3000)" class="text-sm text-green-600 font-semibold flex items-center">
|
||||||
|
Berhasil disimpan!
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-6 rounded-md transition shadow-sm">
|
||||||
|
Simpan Perubahan
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,482 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="id" class="scroll-smooth scroll-pt-24">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>FiFreshChecker | Klasifikasi Kesegaran Insang Ikan</title>
|
||||||
|
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'sans-serif'],
|
||||||
|
heading: ['Poppins', 'sans-serif'],
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
primary: '#0A66C2',
|
||||||
|
'primary-dark': '#004182',
|
||||||
|
accent: '#00C4CC',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700;800&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html { scroll-behavior: smooth; }
|
||||||
|
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
|
||||||
|
.fade-in.visible { opacity: 1; transform: translateY(0); }
|
||||||
|
.fade-in-delay-1 { transition-delay: 0.1s; }
|
||||||
|
.fade-in-delay-2 { transition-delay: 0.2s; }
|
||||||
|
.fade-in-delay-3 { transition-delay: 0.3s; }
|
||||||
|
.fade-in-delay-4 { transition-delay: 0.4s; }
|
||||||
|
.hero-gradient {
|
||||||
|
background: linear-gradient(135deg, #0B192C 0%, #1A365D 50%, #0A66C2 100%);
|
||||||
|
background-size: 200% 200%;
|
||||||
|
animation: gradientShift 8s ease infinite;
|
||||||
|
}
|
||||||
|
@keyframes gradientShift {
|
||||||
|
0% { background-position: 0% 50%; }
|
||||||
|
50% { background-position: 100% 50%; }
|
||||||
|
100% { background-position: 0% 50%; }
|
||||||
|
}
|
||||||
|
.float-animation { animation: floating 4s ease-in-out infinite; }
|
||||||
|
@keyframes floating {
|
||||||
|
0%, 100% { transform: translateY(0px); }
|
||||||
|
50% { transform: translateY(-12px); }
|
||||||
|
}
|
||||||
|
.glow-accent { box-shadow: 0 0 40px rgba(0, 196, 204, 0.3); }
|
||||||
|
.step-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
|
||||||
|
.step-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(10, 102, 194, 0.12); }
|
||||||
|
.nav-scrolled { background: rgba(255,255,255,0.98) !important; box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important; }
|
||||||
|
#mobile-menu { transition: max-height 0.3s ease, opacity 0.3s ease; max-height: 0; overflow: hidden; opacity: 0; }
|
||||||
|
#mobile-menu.open { max-height: 400px; opacity: 1; }
|
||||||
|
.badge-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
|
||||||
|
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
|
||||||
|
.stat-card { background: rgba(255,255,255,0.08); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.12); }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="font-sans text-gray-800 bg-white antialiased">
|
||||||
|
|
||||||
|
<!-- ==================== NAVBAR ==================== -->
|
||||||
|
<nav id="navbar" class="fixed top-0 w-full z-50 bg-white/90 backdrop-blur-md border-b border-gray-100 transition-all duration-300">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="flex justify-between items-center h-20">
|
||||||
|
<a href="{{ route('home') }}" class="font-heading font-bold text-2xl text-primary tracking-tight flex items-center">
|
||||||
|
<i class="bi bi-droplet-half text-cyan-500 mr-2 text-3xl"></i>
|
||||||
|
<span>FiFresh<span class="text-accent">Checker</span></span>
|
||||||
|
</a>
|
||||||
|
<div class="hidden md:flex items-center space-x-8">
|
||||||
|
<a href="#beranda" class="nav-link text-gray-600 hover:text-primary font-medium transition-colors relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all hover:after:w-full">Beranda</a>
|
||||||
|
<a href="#tentang" class="nav-link text-gray-600 hover:text-primary font-medium transition-colors relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all hover:after:w-full">Tentang</a>
|
||||||
|
<a href="#cara-kerja" class="nav-link text-gray-600 hover:text-primary font-medium transition-colors relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all hover:after:w-full">Cara Kerja</a>
|
||||||
|
<a href="#fitur" class="nav-link text-gray-600 hover:text-primary font-medium transition-colors relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all hover:after:w-full">Fitur</a>
|
||||||
|
<a href="{{ route('klasifikasi') }}" class="bg-primary hover:bg-primary-dark text-white font-semibold px-5 py-2.5 rounded-xl transition-all duration-300 hover:shadow-lg hover:shadow-primary/30 hover:-translate-y-0.5">
|
||||||
|
Coba Sekarang
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<button id="mobile-menu-button" class="md:hidden text-gray-600 hover:text-primary focus:outline-none p-2 rounded-lg hover:bg-gray-100 transition-colors">
|
||||||
|
<i id="menu-icon" class="bi bi-list text-2xl"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- Mobile Menu --}}
|
||||||
|
<div id="mobile-menu" class="md:hidden bg-white border-t border-gray-100">
|
||||||
|
<div class="flex flex-col px-6 py-5 space-y-4">
|
||||||
|
<a href="#beranda" class="mobile-link text-gray-700 hover:text-primary font-medium flex items-center gap-2 py-1"><i class="bi bi-house text-primary/60"></i> Beranda</a>
|
||||||
|
<a href="#tentang" class="mobile-link text-gray-700 hover:text-primary font-medium flex items-center gap-2 py-1"><i class="bi bi-info-circle text-primary/60"></i> Tentang</a>
|
||||||
|
<a href="#cara-kerja" class="mobile-link text-gray-700 hover:text-primary font-medium flex items-center gap-2 py-1"><i class="bi bi-gear text-primary/60"></i> Cara Kerja</a>
|
||||||
|
<a href="#fitur" class="mobile-link text-gray-700 hover:text-primary font-medium flex items-center gap-2 py-1"><i class="bi bi-stars text-primary/60"></i> Fitur</a>
|
||||||
|
<a href="{{ route('klasifikasi') }}" class="bg-primary hover:bg-primary-dark text-white font-semibold px-5 py-2.5 rounded-xl transition-all text-center">
|
||||||
|
Coba Sekarang
|
||||||
|
</a>
|
||||||
|
@auth
|
||||||
|
<a href="{{ route('history.index') }}" class="text-gray-600 hover:text-primary font-medium transition-colors text-sm flex items-center gap-1.5">
|
||||||
|
<i class="bi bi-clock-history"></i> Riwayat
|
||||||
|
</a>
|
||||||
|
<form method="POST" action="{{ route('logout') }}" class="inline">
|
||||||
|
@csrf
|
||||||
|
<button type="submit" class="text-gray-500 hover:text-red-500 font-medium text-sm flex items-center gap-1.5 transition-colors">
|
||||||
|
<i class="bi bi-box-arrow-right"></i> Keluar
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- ==================== HERO ==================== -->
|
||||||
|
<section id="beranda" class="hero-gradient relative min-h-screen flex items-center pt-20 overflow-hidden">
|
||||||
|
<div class="absolute inset-0 opacity-[0.04]" style="background-image: radial-gradient(circle, #ffffff 1px, transparent 1px); background-size: 32px 32px;"></div>
|
||||||
|
<div class="absolute top-1/4 right-0 w-96 h-96 bg-accent/20 rounded-full blur-[120px] pointer-events-none"></div>
|
||||||
|
<div class="absolute bottom-0 left-1/4 w-72 h-72 bg-primary/30 rounded-full blur-[100px] pointer-events-none"></div>
|
||||||
|
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 w-full py-16 lg:py-0">
|
||||||
|
<div class="grid lg:grid-cols-2 gap-12 lg:gap-16 items-center">
|
||||||
|
<div class="text-center lg:text-left">
|
||||||
|
<div class="inline-flex items-center gap-2 bg-white/10 backdrop-blur-sm border border-white/20 text-cyan-300 text-sm font-semibold px-4 py-2 rounded-full mb-8 fade-in">
|
||||||
|
<span class="w-2 h-2 bg-cyan-400 rounded-full badge-pulse"></span>
|
||||||
|
Sistem Klasifikasi Berbasis AI · Versi 1.0
|
||||||
|
</div>
|
||||||
|
<h1 class="font-heading text-white text-4xl md:text-5xl lg:text-6xl font-bold leading-tight mb-6 fade-in fade-in-delay-1">
|
||||||
|
Deteksi Kesegaran Ikan dari
|
||||||
|
<span class="text-transparent bg-clip-text bg-gradient-to-r from-cyan-300 to-accent"> Citra Insang</span>
|
||||||
|
</h1>
|
||||||
|
<p class="text-white/75 text-lg md:text-xl font-light mb-10 max-w-xl mx-auto lg:mx-0 leading-relaxed fade-in fade-in-delay-2">
|
||||||
|
Teknologi <em>Machine Learning</em> dengan algoritma <strong class="text-white font-semibold">Naïve Bayes</strong> untuk menganalisis tingkat kesegaran ikan secara otomatis melalui citra insang ikan.
|
||||||
|
</p>
|
||||||
|
<div class="flex flex-col sm:flex-row gap-4 justify-center lg:justify-start fade-in fade-in-delay-3">
|
||||||
|
<a href="{{ route('klasifikasi') }}" class="bg-accent hover:bg-[#00a8af] text-white text-lg font-semibold px-8 py-4 rounded-xl transition-all duration-300 hover:-translate-y-1 glow-accent inline-flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-camera"></i> Mulai Analisis
|
||||||
|
</a>
|
||||||
|
|
||||||
|
@guest
|
||||||
|
<a href="{{ route('login') }}"
|
||||||
|
class="border border-white/30 hover:border-white/60 text-white text-lg font-semibold px-8 py-4 rounded-xl transition-all duration-300 hover:bg-white/10 inline-flex items-center justify-center gap-2 group relative"
|
||||||
|
title="Login untuk menyimpan riwayat klasifikasi">
|
||||||
|
<i class="bi bi-person-circle"></i> Login
|
||||||
|
<span class="absolute -bottom-10 left-1/2 -translate-x-1/2 bg-black/80 text-white text-xs px-3 py-1.5 rounded-lg whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none">
|
||||||
|
<i class="bi bi-clock-history mr-1"></i> Login untuk lihat riwayat
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<a href="{{ route('history.index') }}"
|
||||||
|
class="border border-white/30 hover:border-white/60 text-white text-lg font-semibold px-8 py-4 rounded-xl transition-all duration-300 hover:bg-white/10 inline-flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-clock-history"></i> Riwayat Saya
|
||||||
|
</a>
|
||||||
|
@endguest
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-3 gap-4 mt-12 fade-in fade-in-delay-4">
|
||||||
|
<div class="stat-card rounded-xl p-4 text-center">
|
||||||
|
<div class="font-heading text-2xl font-bold text-white">4</div>
|
||||||
|
<div class="text-white/60 text-xs mt-1">Tingkat Kesegaran</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card rounded-xl p-4 text-center">
|
||||||
|
<div class="font-heading text-2xl font-bold text-white">AI</div>
|
||||||
|
<div class="text-white/60 text-xs mt-1">Naïve Bayes</div>
|
||||||
|
</div>
|
||||||
|
<div class="stat-card rounded-xl p-4 text-center">
|
||||||
|
<div class="font-heading text-2xl font-bold text-white"><i class="bi bi-lightning-charge-fill text-accent"></i></div>
|
||||||
|
<div class="text-white/60 text-xs mt-1">Hasil Instan</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="relative flex justify-center lg:justify-end fade-in fade-in-delay-2">
|
||||||
|
<div class="absolute inset-0 bg-gradient-to-br from-accent/30 to-primary/20 blur-3xl rounded-full scale-75 pointer-events-none"></div>
|
||||||
|
<div class="relative float-animation">
|
||||||
|
<img
|
||||||
|
src="https://images.unsplash.com/photo-1534948216015-843149f72be3?q=80&w=900&auto=format&fit=crop"
|
||||||
|
alt="Analisis Insang Ikan"
|
||||||
|
class="relative w-full max-w-md lg:max-w-lg rounded-[24px] shadow-[0_30px_60px_rgba(0,0,0,0.5)] border-2 border-white/10 object-cover aspect-[4/3]"
|
||||||
|
>
|
||||||
|
<div class="absolute -bottom-4 -left-4 bg-white rounded-2xl shadow-xl p-4 flex items-center gap-3">
|
||||||
|
<div class="w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-check-circle-fill text-green-500 text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-900 text-sm">Insang Terdeteksi</div>
|
||||||
|
<div class="text-green-600 text-xs font-medium">Sangat Segar</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="absolute -top-4 -right-4 bg-primary rounded-2xl shadow-xl p-3 text-white text-center min-w-[80px]">
|
||||||
|
<div class="font-heading text-xl font-bold">AI</div>
|
||||||
|
<div class="text-[10px] font-medium opacity-80">Powered</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="absolute bottom-0 left-0 right-0">
|
||||||
|
<svg viewBox="0 0 1440 80" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
|
||||||
|
<path d="M0,80 L0,40 Q360,0 720,40 Q1080,80 1440,40 L1440,80 Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- ==================== TENTANG ==================== -->
|
||||||
|
<section id="tentang" class="py-24 bg-white">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="grid lg:grid-cols-2 gap-16 items-center">
|
||||||
|
<div class="fade-in order-2 lg:order-1">
|
||||||
|
<span class="inline-block bg-primary/10 text-primary text-sm font-semibold px-4 py-1.5 rounded-full mb-4">Tentang Sistem</span>
|
||||||
|
<h2 class="font-heading text-3xl md:text-4xl font-bold text-gray-900 mb-6 leading-tight">
|
||||||
|
Apa itu <span class="text-primary">FiFreshChecker</span>?
|
||||||
|
</h2>
|
||||||
|
<p class="text-gray-600 text-lg leading-relaxed mb-6">
|
||||||
|
FiFreshChecker adalah sistem klasifikasi kesegaran ikan berbasis <strong class="text-gray-900">Machine Learning</strong> yang menggunakan algoritma <strong class="text-primary">Naïve Bayes</strong> untuk menganalisis citra insang ikan secara otomatis.
|
||||||
|
</p>
|
||||||
|
<p class="text-gray-600 text-lg leading-relaxed mb-8">
|
||||||
|
Sistem mengekstraksi fitur citra — mulai dari fitur warna LAB, HSV, color ratio, hingga tekstur GLCM — dan mengklasifikasikannya ke dalam 4 tingkat kesegaran: <em>Sangat Segar, Segar, Cukup Segar,</em> dan <em>Tidak Segar</em>.
|
||||||
|
</p>
|
||||||
|
<div class="flex flex-wrap gap-3">
|
||||||
|
<span class="bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full">Naïve Bayes</span>
|
||||||
|
<span class="bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full">GLCM Tekstur</span>
|
||||||
|
<span class="bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full">LAB Color Space</span>
|
||||||
|
<span class="bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full">HSV Analysis</span>
|
||||||
|
<span class="bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full">Flask API</span>
|
||||||
|
<span class="bg-gray-100 text-gray-700 text-sm font-medium px-4 py-2 rounded-full">Isolation Forest</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="fade-in fade-in-delay-2 order-1 lg:order-2">
|
||||||
|
<div class="bg-gradient-to-br from-gray-50 to-blue-50 rounded-3xl p-8 border border-gray-100">
|
||||||
|
<h3 class="font-heading font-bold text-gray-900 text-xl mb-6">Mengapa Kesegaran Insang?</h3>
|
||||||
|
<div class="space-y-5">
|
||||||
|
<div class="flex items-start gap-4">
|
||||||
|
<div class="w-10 h-10 bg-primary/10 rounded-xl flex items-center justify-center flex-shrink-0">
|
||||||
|
<i class="bi bi-eye text-primary text-lg"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-900 mb-1">Indikator Visual Terpercaya</div>
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed">Insang adalah jaringan yang paling cepat menunjukkan perubahan warna saat ikan mulai tidak segar — merah cerah menandakan kesegaran.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-start gap-4">
|
||||||
|
<div class="w-10 h-10 bg-accent/10 rounded-xl flex items-center justify-center flex-shrink-0">
|
||||||
|
<i class="bi bi-camera text-accent text-lg"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-900 mb-1">Mudah Difoto</div>
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed">Cukup buka tutup insang ikan dan foto close-up — tidak perlu alat khusus, cukup kamera smartphone.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-start gap-4">
|
||||||
|
<div class="w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center flex-shrink-0">
|
||||||
|
<i class="bi bi-graph-up text-green-500 text-lg"></i>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="font-semibold text-gray-900 mb-1">Fitur Kaya Informasi</div>
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed">Warna, tekstur, dan pola insang mengandung informasi yang kaya untuk diekstraksi dan diklasifikasikan oleh model.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- ==================== CARA KERJA ==================== -->
|
||||||
|
<section id="cara-kerja" class="py-24 bg-gray-50 border-y border-gray-100">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="text-center mb-16 fade-in">
|
||||||
|
<span class="inline-block bg-primary/10 text-primary text-sm font-semibold px-4 py-1.5 rounded-full mb-4">Alur Sistem</span>
|
||||||
|
<h2 class="font-heading text-3xl md:text-4xl font-bold text-gray-900 mb-4">Bagaimana Cara Kerjanya?</h2>
|
||||||
|
<p class="text-gray-500 text-lg max-w-2xl mx-auto">Hanya 3 langkah sederhana dari foto hingga hasil klasifikasi</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid md:grid-cols-3 gap-8 relative">
|
||||||
|
<div class="hidden md:block absolute top-12 left-1/3 right-1/3 h-0.5 bg-gradient-to-r from-primary/30 via-accent/50 to-primary/30 z-0"></div>
|
||||||
|
<div class="step-card bg-white rounded-2xl p-8 border border-gray-100 relative z-10 fade-in">
|
||||||
|
<div class="w-14 h-14 bg-primary text-white rounded-2xl flex items-center justify-center text-2xl mb-6 shadow-lg shadow-primary/20">
|
||||||
|
<i class="bi bi-camera-fill"></i>
|
||||||
|
</div>
|
||||||
|
<div class="absolute top-6 right-6 font-heading text-5xl font-bold text-gray-100 select-none">01</div>
|
||||||
|
<h4 class="font-heading text-xl font-bold text-gray-900 mb-3">Upload Foto Insang</h4>
|
||||||
|
<p class="text-gray-500 leading-relaxed">Foto insang ikan dari jarak dekat menggunakan kamera smartphone. Pastikan insang terlihat jelas dan pencahayaan cukup.</p>
|
||||||
|
</div>
|
||||||
|
<div class="step-card bg-white rounded-2xl p-8 border border-gray-100 relative z-10 fade-in fade-in-delay-1">
|
||||||
|
<div class="w-14 h-14 bg-accent text-white rounded-2xl flex items-center justify-center text-2xl mb-6 shadow-lg shadow-accent/20">
|
||||||
|
<i class="bi bi-cpu-fill"></i>
|
||||||
|
</div>
|
||||||
|
<div class="absolute top-6 right-6 font-heading text-5xl font-bold text-gray-100 select-none">02</div>
|
||||||
|
<h4 class="font-heading text-xl font-bold text-gray-900 mb-3">Proses AI</h4>
|
||||||
|
<p class="text-gray-500 leading-relaxed">Sistem memvalidasi objek, mengekstraksi fitur citra warna dan tekstur, lalu diklasifikasikan oleh model Naïve Bayes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="step-card bg-white rounded-2xl p-8 border border-gray-100 relative z-10 fade-in fade-in-delay-2">
|
||||||
|
<div class="w-14 h-14 bg-green-500 text-white rounded-2xl flex items-center justify-center text-2xl mb-6 shadow-lg shadow-green-500/20">
|
||||||
|
<i class="bi bi-bar-chart-fill"></i>
|
||||||
|
</div>
|
||||||
|
<div class="absolute top-6 right-6 font-heading text-5xl font-bold text-gray-100 select-none">03</div>
|
||||||
|
<h4 class="font-heading text-xl font-bold text-gray-900 mb-3">Hasil Klasifikasi</h4>
|
||||||
|
<p class="text-gray-500 leading-relaxed">Dapatkan hasil klasifikasi 4 tingkat kesegaran beserta probabilitas dan visualisasi area insang yang dianalisis.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-16 fade-in">
|
||||||
|
<h3 class="font-heading text-xl font-bold text-center text-gray-900 mb-8">4 Tingkat Kesegaran</h3>
|
||||||
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||||
|
<div class="bg-white border-2 border-green-200 rounded-2xl p-5 text-center hover:shadow-md transition-shadow">
|
||||||
|
<div class="w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center mx-auto mb-3">
|
||||||
|
<i class="bi bi-star-fill text-green-500 text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="font-heading font-bold text-gray-900 mb-1">Sangat Segar</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-white border-2 border-blue-200 rounded-2xl p-5 text-center hover:shadow-md transition-shadow">
|
||||||
|
<div class="w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center mx-auto mb-3">
|
||||||
|
<i class="bi bi-check-circle-fill text-blue-500 text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="font-heading font-bold text-gray-900 mb-1">Segar</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-white border-2 border-yellow-200 rounded-2xl p-5 text-center hover:shadow-md transition-shadow">
|
||||||
|
<div class="w-12 h-12 bg-yellow-100 rounded-xl flex items-center justify-center mx-auto mb-3">
|
||||||
|
<i class="bi bi-exclamation-circle-fill text-yellow-500 text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="font-heading font-bold text-gray-900 mb-1">Cukup Segar</div>
|
||||||
|
</div>
|
||||||
|
<div class="bg-white border-2 border-red-200 rounded-2xl p-5 text-center hover:shadow-md transition-shadow">
|
||||||
|
<div class="w-12 h-12 bg-red-100 rounded-xl flex items-center justify-center mx-auto mb-3">
|
||||||
|
<i class="bi bi-x-circle-fill text-red-500 text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="font-heading font-bold text-gray-900 mb-1">Tidak Segar</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- ==================== FITUR ==================== -->
|
||||||
|
<section id="fitur" class="py-24 bg-white">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="text-center mb-16 fade-in">
|
||||||
|
<span class="inline-block bg-primary/10 text-primary text-sm font-semibold px-4 py-1.5 rounded-full mb-4">Fitur Unggulan</span>
|
||||||
|
<h2 class="font-heading text-3xl md:text-4xl font-bold text-gray-900 mb-4">Didukung Teknologi Terkini</h2>
|
||||||
|
<p class="text-gray-500 text-lg max-w-2xl mx-auto">Sistem yang dirancang untuk kemudahan penggunaan dengan analisis yang akurat dan terpercaya</p>
|
||||||
|
</div>
|
||||||
|
<div class="grid md:grid-cols-3 gap-8">
|
||||||
|
<div class="group bg-white p-8 rounded-2xl border border-gray-100 hover:-translate-y-2 hover:shadow-xl hover:shadow-primary/8 hover:border-primary/20 transition-all duration-300 fade-in">
|
||||||
|
<div class="w-14 h-14 bg-primary/10 text-primary rounded-2xl flex items-center justify-center text-2xl mb-6 group-hover:bg-primary group-hover:text-white transition-all duration-300 group-hover:scale-110">
|
||||||
|
<i class="bi bi-cloud-arrow-up-fill"></i>
|
||||||
|
</div>
|
||||||
|
<h4 class="font-heading text-xl font-bold text-gray-900 mb-3">Upload Mudah</h4>
|
||||||
|
<p class="text-gray-500 leading-relaxed">Unggah foto insang ikan langsung dari galeri atau ambil gambar menggunakan kamera smartphone. Format JPG, JPEG, dan PNG didukung.</p>
|
||||||
|
</div>
|
||||||
|
<div class="group bg-white p-8 rounded-2xl border border-gray-100 hover:-translate-y-2 hover:shadow-xl hover:shadow-accent/8 hover:border-accent/20 transition-all duration-300 fade-in fade-in-delay-1 relative overflow-hidden">
|
||||||
|
<div class="absolute top-0 right-0 bg-accent text-white text-xs font-bold px-3 py-1 rounded-bl-xl">Inti Sistem</div>
|
||||||
|
<div class="w-14 h-14 bg-accent/10 text-accent rounded-2xl flex items-center justify-center text-2xl mb-6 group-hover:bg-accent group-hover:text-white transition-all duration-300 group-hover:scale-110">
|
||||||
|
<i class="bi bi-cpu-fill"></i>
|
||||||
|
</div>
|
||||||
|
<h4 class="font-heading text-xl font-bold text-gray-900 mb-3">Analisis AI Akurat</h4>
|
||||||
|
<p class="text-gray-500 leading-relaxed">Model Naïve Bayes dilatih dengan dataset insang ikan untuk mengklasifikasikan tingkat kesegaran secara otomatis dan efisien.</p>
|
||||||
|
</div>
|
||||||
|
<div class="group bg-white p-8 rounded-2xl border border-gray-100 hover:-translate-y-2 hover:shadow-xl hover:shadow-green-500/8 hover:border-green-200 transition-all duration-300 fade-in fade-in-delay-2">
|
||||||
|
<div class="w-14 h-14 bg-green-100 text-green-500 rounded-2xl flex items-center justify-center text-2xl mb-6 group-hover:bg-green-500 group-hover:text-white transition-all duration-300 group-hover:scale-110">
|
||||||
|
<i class="bi bi-lightning-charge-fill"></i>
|
||||||
|
</div>
|
||||||
|
<h4 class="font-heading text-xl font-bold text-gray-900 mb-3">Hasil Instan</h4>
|
||||||
|
<p class="text-gray-500 leading-relaxed">Tidak perlu akun atau login. Hasil klasifikasi beserta visualisasi area insang yang dianalisis tersedia dalam hitungan detik.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{{-- ==================== LOGIN BANNER ==================== --}}
|
||||||
|
@guest
|
||||||
|
<section class="py-16 bg-white border-y border-gray-100">
|
||||||
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="bg-gradient-to-br from-blue-50 to-cyan-50 border border-blue-100 rounded-3xl p-8 md:p-12 flex flex-col md:flex-row items-center gap-8">
|
||||||
|
<div class="flex-shrink-0 w-20 h-20 bg-primary/10 rounded-2xl flex items-center justify-center">
|
||||||
|
<i class="bi bi-clock-history text-primary text-4xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1 text-center md:text-left">
|
||||||
|
<h3 class="font-heading text-2xl md:text-3xl font-bold text-gray-900 mb-2">Simpan & Pantau Riwayat Klasifikasi</h3>
|
||||||
|
<p class="text-gray-500 text-base md:text-lg leading-relaxed">Masuk atau daftar gratis untuk menyimpan semua hasil analisis ikan secara otomatis dan melihat riwayat klasifikasi kapan saja.</p>
|
||||||
|
<ul class="mt-4 flex flex-wrap justify-center md:justify-start gap-x-6 gap-y-2 text-sm text-gray-600">
|
||||||
|
<li class="flex items-center gap-1.5"><i class="bi bi-check-circle-fill text-green-500"></i> Hasil tersimpan otomatis</li>
|
||||||
|
<li class="flex items-center gap-1.5"><i class="bi bi-check-circle-fill text-green-500"></i> Lihat riwayat kapan saja</li>
|
||||||
|
<li class="flex items-center gap-1.5"><i class="bi bi-check-circle-fill text-green-500"></i> Gratis tanpa biaya</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col gap-3 flex-shrink-0 w-full md:w-auto">
|
||||||
|
<a href="{{ route('register') }}" class="bg-primary hover:bg-primary-dark text-white font-bold px-8 py-3.5 rounded-xl transition-all hover:-translate-y-0.5 hover:shadow-lg text-center flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-person-plus"></i> Daftar Gratis
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('login') }}" class="border border-primary/30 text-primary hover:bg-primary/5 font-semibold px-8 py-3.5 rounded-xl transition-all text-center flex items-center justify-center gap-2">
|
||||||
|
<i class="bi bi-person"></i> Sudah punya akun? Masuk
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endguest
|
||||||
|
|
||||||
|
<!-- ==================== CTA ==================== -->
|
||||||
|
<section class="py-20 hero-gradient relative overflow-hidden">
|
||||||
|
<div class="absolute inset-0 opacity-[0.03]" style="background-image: radial-gradient(circle, #ffffff 1px, transparent 1px); background-size: 24px 24px;"></div>
|
||||||
|
<div class="absolute top-0 right-1/4 w-64 h-64 bg-accent/20 rounded-full blur-[80px] pointer-events-none"></div>
|
||||||
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center relative z-10 fade-in">
|
||||||
|
<h2 class="font-heading text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-4">Siap Menganalisis Kesegaran Ikan?</h2>
|
||||||
|
<p class="text-white/60 text-base md:text-lg">Gratis · Tanpa Pendaftaran · Hasil dalam Detik</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- ==================== FOOTER ==================== -->
|
||||||
|
<footer class="bg-gray-900 text-gray-400 py-14 border-t border-gray-800">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="flex flex-col md:flex-row justify-between gap-10 mb-10">
|
||||||
|
<div class="max-w-sm">
|
||||||
|
<a href="{{ route('home') }}" class="font-heading font-bold text-2xl text-white flex items-center gap-2 mb-4 hover:text-cyan-400 transition-colors">
|
||||||
|
<i class="bi bi-droplet-half text-cyan-500 text-3xl"></i>
|
||||||
|
<span>FiFresh<span class="text-accent">Checker</span></span>
|
||||||
|
</a>
|
||||||
|
<p class="text-gray-500 text-sm leading-relaxed">Sistem klasifikasi kesegaran ikan berbasis AI menggunakan algoritma Naïve Bayes dan analisis citra insang ikan.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h5 class="font-heading font-semibold text-white mb-4">Tentang Sistem</h5>
|
||||||
|
<ul class="space-y-3 text-sm">
|
||||||
|
<li class="flex items-start gap-2 text-gray-400"><i class="bi bi-mortarboard-fill text-accent mt-0.5 flex-shrink-0"></i><span>Tugas Akhir D3 Manajemen Informatika</span></li>
|
||||||
|
<li class="flex items-start gap-2 text-gray-400"><i class="bi bi-building text-accent mt-0.5 flex-shrink-0"></i><span>Politeknik Negeri Jember</span></li>
|
||||||
|
<li class="flex items-start gap-2 text-gray-400"><i class="bi bi-person-fill text-accent mt-0.5 flex-shrink-0"></i><span>Eki Nanda Lepa — E31230794</span></li>
|
||||||
|
<li class="flex items-start gap-2 text-gray-400"><i class="bi bi-calendar3 text-accent mt-0.5 flex-shrink-0"></i><span>Tahun Akademik 2025/2026</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="border-t border-gray-800 pt-8 flex flex-col md:flex-row justify-between items-center gap-4 text-sm">
|
||||||
|
<p>© 2026 FiFreshChecker. Hak Cipta Dilindungi.</p>
|
||||||
|
<p class="text-gray-600">Teknologi Informasi · Politeknik Negeri Jember</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- ==================== JAVASCRIPT ==================== -->
|
||||||
|
<script>
|
||||||
|
const mobileBtn = document.getElementById('mobile-menu-button');
|
||||||
|
const mobileMenu = document.getElementById('mobile-menu');
|
||||||
|
const menuIcon = document.getElementById('menu-icon');
|
||||||
|
mobileBtn.addEventListener('click', () => {
|
||||||
|
mobileMenu.classList.toggle('open');
|
||||||
|
if (mobileMenu.classList.contains('open')) {
|
||||||
|
menuIcon.classList.replace('bi-list', 'bi-x-lg');
|
||||||
|
} else {
|
||||||
|
menuIcon.classList.replace('bi-x-lg', 'bi-list');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
document.querySelectorAll('.mobile-link').forEach(link => {
|
||||||
|
link.addEventListener('click', () => {
|
||||||
|
mobileMenu.classList.remove('open');
|
||||||
|
menuIcon.classList.replace('bi-x-lg', 'bi-list');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
window.addEventListener('scroll', () => {
|
||||||
|
const navbar = document.getElementById('navbar');
|
||||||
|
if (window.scrollY > 50) {
|
||||||
|
navbar.classList.add('nav-scrolled');
|
||||||
|
} else {
|
||||||
|
navbar.classList.remove('nav-scrolled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const observer = new IntersectionObserver((entries) => {
|
||||||
|
entries.forEach(entry => {
|
||||||
|
if (entry.isIntersecting) entry.target.classList.add('visible');
|
||||||
|
});
|
||||||
|
}, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' });
|
||||||
|
document.querySelectorAll('.fade-in').forEach(el => {
|
||||||
|
observer.observe(el);
|
||||||
|
const rect = el.getBoundingClientRect();
|
||||||
|
if (rect.top < window.innerHeight) el.classList.add('visible');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\Auth\AuthenticatedSessionController;
|
||||||
|
use App\Http\Controllers\Auth\ConfirmablePasswordController;
|
||||||
|
use App\Http\Controllers\Auth\DirectPasswordResetController;
|
||||||
|
use App\Http\Controllers\Auth\EmailVerificationNotificationController;
|
||||||
|
use App\Http\Controllers\Auth\EmailVerificationPromptController;
|
||||||
|
use App\Http\Controllers\Auth\PasswordController;
|
||||||
|
use App\Http\Controllers\Auth\RegisteredUserController;
|
||||||
|
use App\Http\Controllers\Auth\VerifyEmailController;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
Route::middleware('guest')->group(function () {
|
||||||
|
Route::get('register', [RegisteredUserController::class, 'create'])
|
||||||
|
->name('register');
|
||||||
|
|
||||||
|
Route::post('register', [RegisteredUserController::class, 'store']);
|
||||||
|
|
||||||
|
Route::get('login', [AuthenticatedSessionController::class, 'create'])
|
||||||
|
->name('login');
|
||||||
|
|
||||||
|
Route::post('login', [AuthenticatedSessionController::class, 'store']);
|
||||||
|
|
||||||
|
// =============================================
|
||||||
|
// RESET PASSWORD LANGSUNG (tanpa kirim email)
|
||||||
|
// =============================================
|
||||||
|
Route::get('forgot-password', [DirectPasswordResetController::class, 'showEmailForm'])
|
||||||
|
->name('password.request');
|
||||||
|
|
||||||
|
Route::post('forgot-password', [DirectPasswordResetController::class, 'checkEmail'])
|
||||||
|
->name('password.email');
|
||||||
|
|
||||||
|
Route::get('reset-password-direct', [DirectPasswordResetController::class, 'showResetForm'])
|
||||||
|
->name('password.direct.form');
|
||||||
|
|
||||||
|
Route::post('reset-password-direct', [DirectPasswordResetController::class, 'resetPassword'])
|
||||||
|
->name('password.direct.store');
|
||||||
|
});
|
||||||
|
|
||||||
|
Route::middleware('auth')->group(function () {
|
||||||
|
Route::get('verify-email', EmailVerificationPromptController::class)
|
||||||
|
->name('verification.notice');
|
||||||
|
|
||||||
|
Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
|
||||||
|
->middleware(['signed', 'throttle:6,1'])
|
||||||
|
->name('verification.verify');
|
||||||
|
|
||||||
|
Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
|
||||||
|
->middleware('throttle:6,1')
|
||||||
|
->name('verification.send');
|
||||||
|
|
||||||
|
Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
|
||||||
|
->name('password.confirm');
|
||||||
|
|
||||||
|
Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);
|
||||||
|
|
||||||
|
Route::put('password', [PasswordController::class, 'update'])->name('password.update');
|
||||||
|
|
||||||
|
Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
|
||||||
|
->name('logout');
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Inspiring;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
|
Artisan::command('inspire', function () {
|
||||||
|
$this->comment(Inspiring::quote());
|
||||||
|
})->purpose('Display an inspiring quote');
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\ImageController;
|
||||||
|
use App\Http\Controllers\HistoryController;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
// Landing Page
|
||||||
|
Route::get('/', function () {
|
||||||
|
return view('welcome');
|
||||||
|
})->name('home');
|
||||||
|
|
||||||
|
// Klasifikasi — publik
|
||||||
|
Route::get('/klasifikasi', [ImageController::class, 'create'])->name('klasifikasi');
|
||||||
|
Route::post('/klasifikasi', [ImageController::class, 'store'])->name('klasifikasi.store');
|
||||||
|
|
||||||
|
// Riwayat — harus login
|
||||||
|
Route::middleware('auth')->group(function () {
|
||||||
|
Route::get('/history', [HistoryController::class, 'index'])->name('history.index');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Auth routes (login, register, logout)
|
||||||
|
require __DIR__.'/auth.php';
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue