first commit

This commit is contained in:
Laura Nada Claudia Rusydi 2024-08-06 17:20:54 +07:00
commit b2a5ba50c1
640 changed files with 53688 additions and 0 deletions

18
.editorconfig Normal file
View File

@ -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

58
.env.example Normal file
View File

@ -0,0 +1,58 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=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
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

11
.gitattributes vendored Normal file
View File

@ -0,0 +1,11 @@
* text=auto
*.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

18
.gitignore vendored Normal file
View File

@ -0,0 +1,18 @@
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode

66
README.md Normal file
View File

@ -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 over 2000 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 [Patreon page](https://patreon.com/taylorotwell).
### Premium Partners
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[OP.GG](https://op.gg)**
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
- **[Lendio](https://lendio.com)**
## 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).

32
app/Console/Kernel.php Normal file
View File

@ -0,0 +1,32 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}

View File

@ -0,0 +1,50 @@
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of exception types with their corresponding custom log levels.
*
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
*/
protected $levels = [
//
];
/**
* A list of the exception types that are not reported.
*
* @var array<int, class-string<\Throwable>>
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
public function register()
{
$this->reportable(function (Throwable $e) {
//
});
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\LoginRequest;
use App\Models\User;
use App\Providers\RouteServiceProvider;
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();
if (Auth::user()->role == 'administrator') {
return redirect()->route('dashboard');
}
return redirect()->intended(RouteServiceProvider::HOME);
}
/**
* Destroy an authenticated session.
*/
public function destroy(Request $request): RedirectResponse
{
Auth::guard('web')->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
return redirect('/');
}
}

View File

@ -0,0 +1,41 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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(RouteServiceProvider::HOME);
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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(RouteServiceProvider::HOME);
}
$request->user()->sendEmailVerificationNotification();
return back()->with('status', 'verification-link-sent');
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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(RouteServiceProvider::HOME)
: view('auth.verify-email');
}
}

View File

@ -0,0 +1,61 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
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) 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)]);
}
}

View File

@ -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');
}
}

View File

@ -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)]);
}
}

View File

@ -0,0 +1,57 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\Masyarakat;
use App\Models\User;
use App\Providers\RouteServiceProvider;
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;
use Illuminate\Support\Carbon;
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', 'email', 'max:255', 'unique:'.User::class],
'nope' => ['required', 'numeric'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
'role' => ['required'],
]);
$user = User::create([
'name' => ucfirst($request->name),
'email' => strtolower($request->email),
'nope' => $request->nope,
'password' => Hash::make($request->password),
'role' => $request->role,
]);
event(new Registered($user));
Auth::login($user);
return redirect(RouteServiceProvider::HOME);
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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(RouteServiceProvider::HOME.'?verified=1');
}
if ($request->user()->markEmailAsVerified()) {
event(new Verified($request->user()));
}
return redirect()->intended(RouteServiceProvider::HOME.'?verified=1');
}
}

View File

@ -0,0 +1,102 @@
<?php
namespace App\Http\Controllers;
use App\Models\Bobot;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
class BobotController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$numtab = 1;
$bobot = Bobot::latest()->get();
return view('server-side.pages.manajemen-data.bobot.data', compact(
['numtab', 'bobot']
));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$bobotId = (new Bobot())->generateId();
return view('server-side.pages.manajemen-data.bobot.create', compact('bobotId'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$request->validate([
'bobot' => ['required'],
'nilai' => ['required', 'numeric'],
]);
Bobot::create($request->all());
return Redirect::route('bobot.index')->with('message', 'Berhasil menambah data bobot baru');
}
/**
* Display the specified resource.
*
* @param \App\Models\Bobot $bobot
* @return \Illuminate\Http\Response
*/
public function show(Bobot $bobot)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Bobot $bobot
* @return \Illuminate\Http\Response
*/
public function edit(Bobot $bobot)
{
return view('server-side.pages.manajemen-data.bobot.edit', compact('bobot'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Bobot $bobot
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Bobot $bobot)
{
$request->validate([
'bobot' => ['required'],
'nilai' => ['required', 'numeric'],
]);
Bobot::find($bobot->bobotId)->update($request->all());
return Redirect::route('bobot.index')->with('message', 'Berhasil melakukan perubahan pada data bobot yang dipilih');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Bobot $bobot
* @return \Illuminate\Http\Response
*/
public function destroy(Bobot $bobot)
{
$bobot->delete();
return Redirect::route('bobot.index')->with('message', 'Berhasil menghapus data bobot yang dipilih');
}
}

View File

@ -0,0 +1,290 @@
<?php
namespace App\Http\Controllers;
use App\Models\Bobot;
use App\Models\Diagnosa;
use App\Models\DiagnosaDetail;
use App\Models\Gejala;
use App\Models\Informasi;
use App\Models\Kontak;
use App\Models\Penyakit;
use App\Models\Rule;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redirect;
use Whoops\Run;
class ClientController extends Controller
{
public function BlogInformasi()
{
$informasi = Informasi::latest()->get();
return view('client-side.blog-informasi.data', compact('informasi'));
}
public function DetailBlogInformasi($slug)
{
$informasi = Informasi::where('slug', $slug)->first();
return view('client-side.blog-informasi.detail', compact('informasi'));
}
public function KontakKami()
{
return view('client-side.kontak-kami.form');
}
public function KontakStore(Request $request)
{
$request->validate([
'nama' => ['required'],
'email' => ['required', 'email'],
'nope' => ['required', 'numeric'],
'subjek' => ['required'],
'pesan' => ['required'],
]);
Kontak::create($request->all());
return Redirect::route('kontak.index')->with('message', 'Berhasil mengirim pesan kepada admin KlinikSapi.Go');
}
public function DiagnosaPenyakit()
{
$numtab = 1;
$rule = Rule::with('gejala')->select('gejalaId')->distinct()->get();
return view('client-side.konsultasi.diagnosa', compact(['numtab', 'rule']));
}
private function hitungDempsterShafer($gejalaYangDipilih)
{
$rules = DB::table('rules')->whereIn('gejalaId', $gejalaYangDipilih)->get();
$hasilPerhitungan = [];
$m = [];
foreach ($gejalaYangDipilih as $index => $gejalaId) {
$ruleTerkait = $rules->where('gejalaId', $gejalaId);
$belief = $ruleTerkait->max('belief');
$plausibility = 1 - $belief;
$penyakitTerkait = $ruleTerkait->pluck('penyakitId')->toArray();
$m[$index][implode(',', $penyakitTerkait)] = $belief;
$m[$index]['THETA (ϴ)'] = $plausibility;
if ($index == 0) {
$hasilPerhitungan = $m[$index];
} else {
$hasilPerhitungan = $this->hitungKombinasi($hasilPerhitungan, $m[$index]);
}
}
return $hasilPerhitungan;
}
private function hitungKombinasi($m1, $m2)
{
$kombinasi = [];
$conflict = 0;
foreach ($m1 as $k1 => $v1) {
foreach ($m2 as $k2 => $v2) {
if ($k1 == 'THETA (ϴ)' && $k2 == 'THETA (ϴ)') {
$key = 'THETA (ϴ)';
} elseif ($k1 == 'THETA (ϴ)') {
$key = $k2;
} elseif ($k2 == 'THETA (ϴ)') {
$key = $k1;
} else {
$set1 = explode(',', $k1);
$set2 = explode(',', $k2);
$intersection = array_intersect($set1, $set2);
if (empty($intersection)) {
$conflict += $v1 * $v2;
continue;
}
$key = implode(',', $intersection);
}
if (!isset($kombinasi[$key])) {
$kombinasi[$key] = 0;
}
$kombinasi[$key] += $v1 * $v2;
}
}
// // Normalisasi
// if ($conflict < 1) {
// foreach ($kombinasi as $k => $v) {
// $kombinasi[$k] = $v / (1 - $conflict);
// }
// }
return $kombinasi;
}
public function HasilDiagnosa(Request $request)
{
$request->validate([
'gejala' => 'required|array|min:2|max:6',
'gejala.*' => 'required|string',
], [
'gejala.required' => 'Pilih 2 sampai 6 gejala untuk melakukan diagnosa!',
'gejala.min' => 'Harus memilih setidaknya dua gejala!',
'gejala.max' => 'Maaf, maksimal hanya boleh memilih 6 gejala!',
]);
$diagnosaId = (new Diagnosa())->generateId();
$firsttab = 1; $secondtab = 1; $thirdtab = 1;
$selectedGejala = $request->gejala;
// Ambil data terkait gejala yang dipilih
$datarules = Rule::with('gejala', 'penyakit')->whereIn('gejalaId', $selectedGejala)->get();
// Kelompokkan berdasarkan gejalaId
$groupedResults = $datarules->groupBy('gejalaId')->map(function ($group) {
$firstGejala = $group->first()->gejala;
$gejalaId = $firstGejala->gejalaId;
$gejalaName = $firstGejala->gejala;
// Gabungkan nilai pakar (rata-rata)
$totalBelief = round($group->avg('nilaiPakar'), 2);
$totalPlausibility = round(1 - $totalBelief, 2);
return [
'gejalaId' => $gejalaId,
'gejala' => $gejalaName,
'allbelief' => $group->pluck('nilaiPakar')->toArray(),
'belief' => $totalBelief,
'plausibility' => $totalPlausibility,
'penyakitIds' => $group->pluck('penyakitId')->unique()->toArray() // Menyimpan penyakit terkait
];
});
$gejalaYangDipilih = $request->input('gejala');
$hasilPerhitungan = $this->hitungDempsterShafer($gejalaYangDipilih);
// Urutkan hasil dari probabilitas tertinggi ke terendah
arsort($hasilPerhitungan);
// Ambil penyakit dengan probabilitas tertinggi
$penyakitTerdiagnosa = key($hasilPerhitungan);
$probabilitas = current($hasilPerhitungan);
// Jika hasil bukan 'THETA (ϴ)', pecah string penyakit menjadi array
if ($penyakitTerdiagnosa !== 'THETA (ϴ)') {
$penyakitTerdiagnosa = explode(',', $penyakitTerdiagnosa);
}
// Ambil detail penyakit dari database
// $detailPenyakit = DB::table('penyakits')->whereIn('penyakitId', $penyakitTerdiagnosa)->get();
return view('client-side.konsultasi.hasil-diagnosa', compact(
['diagnosaId', 'firsttab', 'secondtab', 'thirdtab', 'groupedResults', 'probabilitas', 'hasilPerhitungan', 'penyakitTerdiagnosa']
));
}
// public function HasilDiagnosa(Request $request)
// {
// $request->validate([
// 'gejala' => 'required|array',
// 'gejala.*' => 'required|string',
// ], [
// 'gejala.required' => 'Pilih setidaknya satu gejala!',
// ]);
// $diagnosaId = (new Diagnosa())->generateId();
// $firsttab = 1; $secondtab = 1; $thirdtab = 1;
// $selectedGejala = $request->gejala;
// // Ambil data terkait gejala yang dipilih
// $rules = Rule::with('gejala', 'penyakit')->whereIn('gejalaId', $selectedGejala)->get();
// // Kelompokkan berdasarkan gejalaId
// $groupedResults = $rules->groupBy('gejalaId')->map(function ($group) {
// $firstGejala = $group->first()->gejala;
// $gejalaId = $firstGejala->gejalaId;
// $gejalaName = $firstGejala->gejala;
// // Gabungkan nilai pakar (rata-rata)
// $totalBelief = round($group->avg('nilaiPakar'), 3);
// $totalPlausibility = round(1 - $totalBelief, 3);
// return [
// 'gejalaId' => $gejalaId,
// 'gejala' => $gejalaName,
// 'allbelief' => $group->pluck('nilaiPakar')->toArray(),
// 'belief' => $totalBelief,
// 'plausibility' => $totalPlausibility,
// 'penyakitIds' => $group->pluck('penyakitId')->unique()->toArray() // Menyimpan penyakit terkait
// ];
// });
// // Perhitungan Dempster-Shafer
// $dempsterResults = $this->calculateDempsterShafer($groupedResults);
// // Temukan penyakit dengan nilai keyakinan terbesar
// $maxBelief = max($dempsterResults);
// $diagnosaTerbaik = array_search($maxBelief, $dempsterResults);
// // Sorting Dempster-Shafer DESC
// $dempsterResults = collect($dempsterResults)->sortDesc();
// return view('client-side.konsultasi.hasil-diagnosa', compact(
// ['diagnosaId', 'firsttab', 'secondtab', 'thirdtab', 'groupedResults', 'dempsterResults', 'maxBelief', 'diagnosaTerbaik']
// ));
// }
// private function calculateDempsterShafer($groupedResults)
// {
// $dempsterResults = [];
// // Inisialisasi nilai belief untuk setiap penyakit
// $beliefs = [];
// foreach ($groupedResults as $result) {
// foreach ($result['penyakitIds'] as $penyakitId) {
// if (!isset($beliefs[$penyakitId])) {
// $beliefs[$penyakitId] = 1;
// }
// // Kombinasi nilai belief untuk setiap penyakit
// $beliefs[$penyakitId] *= $result['belief'];
// }
// }
// // Normalisasi nilai belief
// $sumBelief = array_sum($beliefs);
// foreach ($beliefs as $penyakitId => $belief) {
// $dempsterResults[$penyakitId] = $belief / $sumBelief;
// }
// return $dempsterResults;
// }
public function DiagnosaStore(Request $request) {
Diagnosa::create($request->all());
if (count($request->gejalaId) > 0) {
foreach ($request->gejalaId as $key => $value) {
$multipleInsert = array(
'diagnosaId' => $request->diagnosaId,
'gejalaId' => $request->gejalaId[$key],
'nilaiKeyakinan' => $request->nilaiKeyakinan[$key],
);
DiagnosaDetail::create($multipleInsert);
}
}
return Redirect::route('riwayat.diagnosa', Auth::user()->id)->with('message', 'Berhasil menyimpan hasil diagnosa terbaru');
}
public function SolusiPerawatan()
{
$solusi = Penyakit::all();
return view('client-side.konsultasi.solusi', compact('solusi'));
}
public function RiwayatDiagnosa($userId)
{
$numtab = 1;
$diagnosa = Diagnosa::with(['user'])->where('userId', $userId)->get();
return view('client-side.konsultasi.riwayat-diagnosa', compact(['numtab', 'diagnosa']));
}
public function DetailDiagnosa($diagnosaId)
{
$numtab = 1;
$diagnosa = Diagnosa::with(['user', 'penyakit'])->where('diagnosaId', $diagnosaId)->first();
$detail = DiagnosaDetail::with(['gejala'])->where('diagnosaId', $diagnosaId)->get();
return view('client-side.konsultasi.detail', compact(['numtab', 'diagnosa', 'detail']));
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}

View File

@ -0,0 +1,92 @@
<?php
namespace App\Http\Controllers;
use App\Models\Diagnosa;
use App\Models\DiagnosaDetail;
use Illuminate\Http\Request;
class DiagnosaController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$numtab = 1;
$diagnosa = Diagnosa::with(['user', 'penyakit'])->get();
return view('server-side.pages.manajemen-laporan.diagnosa.data', compact(['numtab', 'diagnosa']));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$diagnosaId = (new Diagnosa())->generateId();
// return view('server-side.pages.manajemen-laporan..', compact('diagnosaId'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param \App\Models\Diagnosa $diagnosa
* @return \Illuminate\Http\Response
*/
public function show(Diagnosa $diagnosa)
{
$numtab = 1;
$detail = DiagnosaDetail::with(['gejala'])->where('diagnosaId', $diagnosa->diagnosaId)->get();
return view('server-side.pages.manajemen-laporan.diagnosa.detail', compact(['numtab', 'diagnosa', 'detail']));
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Diagnosa $diagnosa
* @return \Illuminate\Http\Response
*/
public function edit(Diagnosa $diagnosa)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Diagnosa $diagnosa
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Diagnosa $diagnosa)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Diagnosa $diagnosa
* @return \Illuminate\Http\Response
*/
public function destroy(Diagnosa $diagnosa)
{
$diagnosa->delete();
return redirect()->route('diagnosa.index')->with('message', 'Berhasil menghapus data diagnosa yang dipilih');
}
}

View File

@ -0,0 +1,100 @@
<?php
namespace App\Http\Controllers;
use App\Models\Gejala;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
class GejalaController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$numtab = 1;
$gejala = Gejala::latest()->get();
return view('server-side.pages.manajemen-data.gejala.data', compact(
['numtab', 'gejala']
));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$gejalaId = (new Gejala())->generateId();
return view('server-side.pages.manajemen-data.gejala.create', compact('gejalaId'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$request->validate([
'gejala' => ['required'],
]);
Gejala::create($request->all());
return Redirect::route('gejala.index')->with('message', 'Berhasil menambah data gejala baru');
}
/**
* Display the specified resource.
*
* @param \App\Models\Gejala $gejala
* @return \Illuminate\Http\Response
*/
public function show(Gejala $gejala)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Gejala $gejala
* @return \Illuminate\Http\Response
*/
public function edit(Gejala $gejala)
{
return view('server-side.pages.manajemen-data.gejala.edit', compact('gejala'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Gejala $gejala
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Gejala $gejala)
{
$request->validate([
'gejala' => ['required'],
]);
Gejala::find($gejala->gejalaId)->update($request->all());
return Redirect::route('gejala.index')->with('message', 'Berhasil melakukan perubahan pada data gejala yang dipilih');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Gejala $gejala
* @return \Illuminate\Http\Response
*/
public function destroy(Gejala $gejala)
{
$gejala->delete();
return Redirect::route('gejala.index')->with('message', 'Berhasil menghapus data gejala yang dipilih');
}
}

View File

@ -0,0 +1,160 @@
<?php
namespace App\Http\Controllers;
use App\Models\Informasi;
use App\Models\Penyakit;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Redirect;
class InformasiController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$numtab = 1;
$informasi = Informasi::with(['penyakit'])->latest()->get();
return view('server-side.pages.manajemen-konten.informasi.data', compact([
'numtab', 'informasi'
]));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$penyakit = Penyakit::all();
return view('server-side.pages.manajemen-konten.informasi.create', compact('penyakit'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$request->validate([
'judul' => ['required'],
'penyakitId' => ['required'],
'gambar' => ['required', 'image', 'mimes:png,jpg,jpeg', 'max:2048'],
'artikel' => ['required'],
]);
$data = $request->all();
$gambar = $data['gambar'];
$filename = strtolower(time() . '-' . $gambar->getClientOriginalName());
$destinationPath = public_path('assets/images/informasi');
$gambar->move($destinationPath, $filename);
$data['gambar'] = strtolower(time() . '-' . $gambar->getClientOriginalName());
Informasi::create([
'penyakitId' => $data['penyakitId'],
'judul' => ucwords($data['judul']),
'slug' => Str::slug($data['judul']),
'gambar' => $data['gambar'],
'penulis' => Auth::user()->name,
'artikel' => $data['artikel'],
]);
return Redirect::route('informasi.index')->with('message', 'Berhasil menambah data informasi baru');
}
/**
* Display the specified resource.
*
* @param \App\Models\Informasi $informasi
* @return \Illuminate\Http\Response
*/
public function show(Informasi $informasi)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Informasi $informasi
* @return \Illuminate\Http\Response
*/
public function edit(Informasi $informasi)
{
$detail = Informasi::where('id', $informasi->id)->first();
$penyakit = Penyakit::all();
return view('server-side.pages.manajemen-konten.informasi.edit', compact('informasi', 'detail', 'penyakit'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Informasi $informasi
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Informasi $informasi)
{
$validatedData = $request->validate([
'judul' => ['required'],
'penyakitId' => ['required'],
'gambar' => $request->hasFile('gambar') ? ['image', 'mimes:png,jpg,jpeg', 'max:2048'] : ['nullable'],
'artikel' => ['required'],
]);
$data = $request->all();
if ($request->hasFile('gambar')) {
if ($informasi->gambar) {
$oldImagePath = public_path('assets/images/informasi/' . $informasi->gambar);
if (File::exists($oldImagePath)) {
File::delete($oldImagePath);
}
}
$gambar = $request->file('gambar');
$filename = strtolower(time() . '-' . $gambar->getClientOriginalName());
$destinationPath = public_path('assets/images/informasi');
$gambar->move($destinationPath, $filename);
$data['gambar'] = $filename;
} else {
$data['gambar'] = $request->input('gambar_lama');
}
Informasi::find($informasi->id)->update([
'penyakitId' => $data['penyakitId'],
'judul' => ucwords($data['judul']),
'slug' => Str::slug($data['judul']),
'gambar' => $data['gambar'],
'penulis' => Auth::user()->name,
'artikel' => $data['artikel'],
]);
return redirect()->route('informasi.index')->with('message', 'Berhasil memperbarui data informasi yang dipilih');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Informasi $informasi
* @return \Illuminate\Http\Response
*/
public function destroy(Informasi $informasi)
{
if ($informasi->gambar) {
$imagePath = public_path('assets/images/informasi/' . $informasi->gambar);
if (File::exists($imagePath)) {
File::delete($imagePath);
}
}
$informasi->delete();
return redirect()->route('informasi.index')->with('message', 'Berhasil menghapus data informasi yang dipilih');
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class KontakController extends Controller
{
//
}

View File

@ -0,0 +1,116 @@
<?php
namespace App\Http\Controllers;
use App\Models\Penyakit;
use App\Models\Rule;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
class PenyakitController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$numtab = 1;
$penyakit = Penyakit::latest()->get();
return view('server-side.pages.manajemen-data.penyakit.data', compact([
'numtab', 'penyakit'
]));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$penyakitId = (new Penyakit())->generateId();
return view('server-side.pages.manajemen-data.penyakit.create', compact('penyakitId'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$request->validate([
'penyakit' => ['required'],
'deskripsi' => ['required'],
'solusi' => ['required'],
]);
Penyakit::create($request->all());
return Redirect::route('penyakit.index')->with('message', 'Berhasil menambah data penyakit baru');
}
/**
* Display the specified resource.
*
* @param \App\Models\Penyakit $penyakit
* @return \Illuminate\Http\Response
*/
public function show(Penyakit $penyakit)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Penyakit $penyakit
* @return \Illuminate\Http\Response
*/
public function edit(Penyakit $penyakit)
{
return view('server-side.pages.manajemen-data.penyakit.edit', compact('penyakit'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Penyakit $penyakit
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Penyakit $penyakit)
{
$request->validate([
'penyakit' => ['required'],
'deskripsi' => ['required'],
'solusi' => ['required'],
]);
Penyakit::find($penyakit->penyakitId)->update($request->all());
return Redirect::route('penyakit.index')->with('message', 'Berhasil melakukan perubahan pada data penyakit yang dipilih');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Penyakit $penyakit
* @return \Illuminate\Http\Response
*/
public function destroy(Penyakit $penyakit)
{
$gejalaIds = Rule::where('penyakitId', $penyakit->penyakitId)->pluck('gejalaId')->unique();
$penyakit->delete();
foreach ($gejalaIds as $gejalaId) {
$rules = Rule::where('gejalaId', $gejalaId)->get();
$totalNilaiPakar = $rules->sum('nilaiPakar');
$jumlahGejala = $rules->count();
$belief = $jumlahGejala > 0 ? $totalNilaiPakar / $jumlahGejala : 0;
Rule::where('gejalaId', $gejalaId)->update(['belief' => $belief]);
}
return Redirect::route('penyakit.index')->with('message', 'Berhasil menghapus data penyakit yang dipilih');
}
}

View File

@ -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('/');
}
}

View File

@ -0,0 +1,206 @@
<?php
namespace App\Http\Controllers;
use App\Models\Bobot;
use App\Models\Gejala;
use App\Models\Penyakit;
use App\Models\Rule;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redirect;
class RuleController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$numtab = 1;
$rules = Rule::with(['penyakit'])->orderBy('penyakitId')->latest()->get()->unique('penyakitId');
return view('server-side.pages.manajemen-data.rules.data', compact(
['numtab', 'rules',]
));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
$penyakit = Penyakit::all();
$gejala = Gejala::all();
$bobot = Bobot::all();
return view('server-side.pages.manajemen-data.rules.create', compact(['penyakit', 'gejala', 'bobot']));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
if (count($request->gejalaId) > 0) {
$gejalaIds = $request->gejalaId;
$penyakitId = $request->penyakitId;
$nilaiPakar = $request->nilaiPakar;
foreach ($gejalaIds as $key => $gejalaId) {
$existingRules = Rule::where('gejalaId', $gejalaId)->get();
$totalNilaiPakar = $existingRules->sum('nilaiPakar');
$jumlahGejala = $existingRules->count();
$nilaiPakarBaru = $nilaiPakar[$key];
$belief = ($totalNilaiPakar + $nilaiPakarBaru) / ($jumlahGejala + 1);
$multipleInsert = array(
'penyakitId' => $penyakitId,
'gejalaId' => $gejalaId,
'nilaiPakar' => $nilaiPakarBaru,
'belief' => $belief,
);
Rule::create($multipleInsert);
Rule::where('gejalaId', $gejalaId)->update(['belief' => $belief]);
}
return Redirect::route('rule.index')->with('message', 'Berhasil menambah data rules baru dan memperbarui nilai belief');
}
}
/**
* Display the specified resource.
*
* @param \App\Models\Rule $rule
* @return \Illuminate\Http\Response
*/
public function show($penyakitId)
{
$numtab = 1;
$detail = Rule::with(['penyakit', 'gejala'])->where('penyakitId', $penyakitId)->latest()->get();
return view('server-side.pages.manajemen-data.rules.detail', compact(
['numtab', 'detail']
));
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Rule $rule
* @return \Illuminate\Http\Response
*/
public function edit($penyakitId)
{
$numtab = 1;
$bobot = Bobot::all();
$gejala = Gejala::all();
$rules = Rule::with(['penyakit', 'gejala'])->where('penyakitId', $penyakitId)->latest()->get();
return view('server-side.pages.manajemen-data.rules.edit', compact(
['numtab', 'bobot', 'gejala', 'rules']
));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\Rule $rule
* @return \Illuminate\Http\Response
*/
public function update(Request $request)
{
if (count($request->gejalaId) > 0) {
$gejalaIds = $request->gejalaId;
$penyakitId = $request->penyakitId;
$nilaiPakar = $request->nilaiPakar;
$ids = $request->id;
$existingRules = Rule::whereIn('id', $ids)->get()->keyBy('id');
foreach ($gejalaIds as $key => $gejalaId) {
$multipleUpdate = array(
'penyakitId' => $penyakitId,
'gejalaId' => $gejalaId,
'nilaiPakar' => $nilaiPakar[$key],
);
Rule::find($ids[$key])->update($multipleUpdate);
}
$gejalaTerdampak = array_unique($gejalaIds);
foreach ($gejalaTerdampak as $gejalaId) {
$rules = Rule::where('gejalaId', $gejalaId)->get();
$totalNilaiPakar = $rules->sum('nilaiPakar');
$jumlahGejala = $rules->count();
$belief = $jumlahGejala > 0 ? $totalNilaiPakar / $jumlahGejala : 0;
Rule::where('gejalaId', $gejalaId)->update(['belief' => $belief]);
}
foreach ($existingRules as $rule) {
if (!in_array($rule->gejalaId, $gejalaIds)) {
$rules = Rule::where('gejalaId', $rule->gejalaId)->get();
$totalNilaiPakar = $rules->sum('nilaiPakar');
$jumlahGejala = $rules->count();
$belief = $jumlahGejala > 0 ? $totalNilaiPakar / $jumlahGejala : 0;
Rule::where('gejalaId', $rule->gejalaId)->update(['belief' => $belief]);
}
}
return Redirect::route('rule.index')->with('message', 'Berhasil melakukan perubahan pada data rules diagnosa yang dipilih');
}
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Rule $rule
* @return \Illuminate\Http\Response
*/
public function destroy(Request $request, Rule $rule)
{
$gejalaId = $rule->gejalaId;
$rule->delete();
$rules = Rule::where('gejalaId', $gejalaId)->get();
$totalNilaiPakar = $rules->sum('nilaiPakar');
$jumlahGejala = $rules->count();
$belief = $jumlahGejala > 0 ? $totalNilaiPakar / $jumlahGejala : 0;
Rule::where('gejalaId', $gejalaId)->update(['belief' => $belief]);
return Redirect::route('rule.show', $request->penyakitId)->with('message', 'Berhasil menghapus rule gejala diagnosa yang dipilih');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Models\Rule $rule
* @return \Illuminate\Http\Response
*/
public function destroyByPenyakit($penyakitId)
{
$rules = Rule::where('penyakitId', $penyakitId)->get();
$gejalaIds = $rules->pluck('gejalaId')->unique();
Rule::where('penyakitId', $penyakitId)->delete();
foreach ($gejalaIds as $gejalaId) {
$rules = Rule::where('gejalaId', $gejalaId)->get();
$totalNilaiPakar = $rules->sum('nilaiPakar');
$jumlahGejala = $rules->count();
$belief = $jumlahGejala > 0 ? $totalNilaiPakar / $jumlahGejala : 0;
Rule::where('gejalaId', $gejalaId)->update(['belief' => $belief]);
}
return Redirect::route('rule.index')->with('message', 'Berhasil menghapus data rules diagnosa penyakit yang dipilih');
}
}

View File

@ -0,0 +1,88 @@
<?php
namespace App\Http\Controllers;
use App\Models\Diagnosa;
use App\Models\Gejala;
use App\Models\Informasi;
use App\Models\Kontak;
use App\Models\Penyakit;
use App\Models\Rule;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Validation\Rules;
class ServerController extends Controller
{
public function Dashboard()
{
$totalPenyakit = Penyakit::all()->count();
$totalGejala = Gejala::all()->count();
$totalPengguna = User::all()->count();
$totalDiagnosa = Diagnosa::all()->count();
$totalRules = Rule::all()->count();
$totalArtikel = Informasi::all()->count();
return view('server-side.pages.dashboard.dashboard', compact(
['totalPenyakit', 'totalGejala', 'totalPengguna', 'totalDiagnosa', 'totalRules', 'totalArtikel']
));
}
public function RegistrasiPengguna()
{
return view('server-side.pages.manajemen-pengguna.registrasi-pengguna');
}
public function RegistrasiStore(Request $request)
{
$request->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:' . User::class],
'nope' => ['required', 'numeric'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
'role' => ['required'],
]);
User::create([
'name' => ucfirst($request->name),
'email' => strtolower($request->email),
'nope' => $request->email,
'password' => Hash::make($request->password),
'role' => $request->role,
]);
return Redirect::route('data.pengguna')->with('message', 'Berhasil melakukan registrasi pengguna baru');
}
public function HapusPengguna($penggunaId)
{
User::findOrFail($penggunaId)->delete();
return Redirect::route('data.pengguna')->with('message', 'Berhasil menghapus pengguna');
}
public function DataPengguna()
{
$numtab = 1;
$pengguna = User::all();
return view('server-side.pages.manajemen-pengguna.data-pengguna', compact(
['numtab', 'pengguna']
));
}
public function PesanPengguna()
{
$numtab = 1;
$pesan = Kontak::all();
return view('server-side.pages.manajemen-laporan.pesan.data', compact(
['numtab', 'pesan']
));
}
public function HapusPesan($id)
{
Kontak::find($id)->delete();
return Redirect::route('pesan.pengguna')->with('message', 'Berhasil menghapus pesan pengguna yang dipilih');
}
}

67
app/Http/Kernel.php Normal file
View File

@ -0,0 +1,67 @@
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];
/**
* The application's route middleware groups.
*
* @var array<string, array<int, class-string|string>>
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
'throttle:api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array<string, class-string|string>
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
class PreventRequestsDuringMaintenance extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @param string|null ...$guards
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next, ...$guards)
{
$guards = empty($guards) ? [null] : $guards;
foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
return redirect(RouteServiceProvider::HOME);
}
}
return $next($request);
}
}

View File

@ -0,0 +1,19 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array<int, string>
*/
protected $except = [
'current_password',
'password',
'password_confirmation',
];
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array<int, string|null>
*/
public function hosts()
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array<int, string>|string|null
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
class ValidateSignature extends Middleware
{
/**
* The names of the query string parameters that should be ignored.
*
* @var array<int, string>
*/
protected $except = [
// 'fbclid',
// 'utm_campaign',
// 'utm_content',
// 'utm_medium',
// 'utm_source',
// 'utm_term',
];
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

View File

@ -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\Rule|array|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->input('email')).'|'.$this->ip());
}
}

View File

@ -0,0 +1,23 @@
<?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\Rule|array|string>
*/
public function rules(): array
{
return [
'name' => ['string', 'max:255'],
'email' => ['email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)],
];
}
}

28
app/Models/Bobot.php Normal file
View File

@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Bobot extends Model
{
use HasFactory;
protected $primaryKey = 'bobotId';
protected $keyType = 'string';
protected $fillable = [
'bobotId',
'bobot',
'nilai',
];
public function generateId()
{
$maxId = DB::table('bobots')->max(DB::raw('CAST(SUBSTRING(bobotId, 6) AS UNSIGNED)'));
$maxId = $maxId ? : 0;
$newId = $maxId + 1;
$formattedId = sprintf("%02d", $newId);
return 'BBID-' . $formattedId;
}
}

39
app/Models/Diagnosa.php Normal file
View File

@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Diagnosa extends Model
{
use HasFactory;
protected $primaryKey = 'diagnosaId';
protected $keyType = 'string';
protected $fillable = [
'diagnosaId',
'userId',
'penyakitId',
'probabilitas',
];
public function user()
{
return $this->belongsTo(User::class, 'userId');
}
public function penyakit()
{
return $this->belongsTo(Penyakit::class, 'penyakitId');
}
public function generateId()
{
$maxId = DB::table('diagnosas')->max(DB::raw('CAST(SUBSTRING(diagnosaId, 6) AS UNSIGNED)'));
$maxId = $maxId ?: 0;
$newId = $maxId + 1;
$formattedId = sprintf("%04d", $newId);
return 'DNID-' . $formattedId;
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class DiagnosaDetail extends Model
{
use HasFactory;
protected $primaryKey = 'id';
protected $fillable = [
'diagnosaId',
'gejalaId',
'nilaiKeyakinan',
];
public function gejala()
{
return $this->belongsTo(Gejala::class, 'gejalaId', 'gejalaId');
}
}

37
app/Models/Gejala.php Normal file
View File

@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Gejala extends Model
{
use HasFactory;
protected $primaryKey = 'gejalaId';
protected $keyType = 'string';
protected $fillable = [
'gejalaId',
'gejala',
];
public function rule()
{
return $this->hasMany(Rule::class, 'gejalaId');
}
public function diagnosaDetail()
{
return $this->hasMany(DiagnosaDetail::class, 'gejalaId', 'gejalaId');
}
public function generateId()
{
$maxId = DB::table('gejalas')->max(DB::raw('CAST(SUBSTRING(gejalaId, 6) AS UNSIGNED)'));
$maxId = $maxId ?: 0;
$newId = $maxId + 1;
$formattedId = sprintf("%03d", $newId);
return 'GJID-' . $formattedId;
}
}

25
app/Models/Informasi.php Normal file
View File

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Informasi extends Model
{
use HasFactory;
protected $primaryKey = 'id';
protected $fillable = [
'penyakitId',
'judul',
'slug',
'gambar',
'penulis',
'artikel',
];
public function penyakit()
{
return $this->belongsTo(Penyakit::class, 'penyakitId', 'penyakitId');
}
}

19
app/Models/Kontak.php Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Kontak extends Model
{
use HasFactory;
protected $primaryKey = 'id';
protected $fillable = [
'nama',
'email',
'nope',
'subjek',
'pesan',
];
}

44
app/Models/Penyakit.php Normal file
View File

@ -0,0 +1,44 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Penyakit extends Model
{
use HasFactory;
protected $primaryKey = 'penyakitId';
protected $keyType = 'string';
protected $fillable = [
'penyakitId',
'penyakit',
'deskripsi',
'solusi',
];
public function rule()
{
return $this->hasMany(Rule::class, 'penyakitId');
}
public function diagnosa()
{
return $this->hasMany(Diagnosa::class, 'penyakitId');
}
public function informasi()
{
return $this->hasMany(Informasi::class, 'penyakitId', 'penyakitId');
}
public function generateId()
{
$maxId = DB::table('penyakits')->max(DB::raw('CAST(SUBSTRING(penyakitId, 6) AS UNSIGNED)'));
$maxId = $maxId ?: 0;
$newId = $maxId + 1;
$formattedId = sprintf("%02d", $newId);
return 'PKID-' . $formattedId;
}
}

29
app/Models/Rule.php Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Rule extends Model
{
use HasFactory;
protected $primaryKey = 'id';
protected $fillable = [
'penyakitId',
'gejalaId',
'nilaiPakar',
'belief',
];
public function penyakit()
{
return $this->belongsTo(Penyakit::class, 'penyakitId');
}
public function gejala()
{
return $this->belongsTo(Gejala::class, 'gejalaId');
}
}

56
app/Models/User.php Normal file
View File

@ -0,0 +1,56 @@
<?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;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'nope',
'password',
'role',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function isAdmin(): bool
{
return $this->role === 'administrator';
}
public function diagnosa()
{
return $this->hasMany(Diagnosa::class, 'userId');
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Providers;
// use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The model to policy mappings for the application.
*
* @var array<class-string, class-string>
*/
protected $policies = [
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}

View File

@ -0,0 +1,42 @@
<?php
namespace App\Providers;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
/**
* The event to listener mappings for the application.
*
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()
{
//
}
/**
* Determine if events and listeners should be automatically discovered.
*
* @return bool
*/
public function shouldDiscoverEvents()
{
return false;
}
}

View File

@ -0,0 +1,52 @@
<?php
namespace App\Providers;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
/**
* The path to the "home" route for your application.
*
* Typically, users are redirected here after authentication.
*
* @var string
*/
public const HOME = '/';
/**
* Define your route model bindings, pattern filters, and other route configuration.
*
* @return void
*/
public function boot()
{
$this->configureRateLimiting();
$this->routes(function () {
Route::middleware('api')
->prefix('api')
->group(base_path('routes/api.php'));
Route::middleware('web')
->group(base_path('routes/web.php'));
});
}
/**
* Configure the rate limiters for the application.
*
* @return void
*/
protected function configureRateLimiting()
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}

View File

@ -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');
}
}

View File

@ -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');
}
}

53
artisan Normal file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually. It's great to relax.
|
*/
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);

55
bootstrap/app.php Normal file
View File

@ -0,0 +1,55 @@
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;

2
bootstrap/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

67
composer.json Normal file
View File

@ -0,0 +1,67 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.0.2",
"guzzlehttp/guzzle": "^7.7",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.19",
"laravel/pint": "^1.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.4",
"pestphp/pest": "^1.22",
"pestphp/pest-plugin-laravel": "^1.2",
"spatie/laravel-ignition": "^1.0"
},
"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"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

8408
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

215
config/app.php Normal file
View File

@ -0,0 +1,215 @@
<?php
use Illuminate\Support\Facades\Facade;
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'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
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| 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' => 'file',
// 'store' => 'redis',
],
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => Facade::defaultAliases()->merge([
// 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(),
];

111
config/auth.php Normal file
View File

@ -0,0 +1,111 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire 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.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
];

70
config/broadcasting.php Normal file
View File

@ -0,0 +1,70 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];

110
config/cache.php Normal file
View File

@ -0,0 +1,110 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| 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: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],
'file' => [
'driver' => 'file',
'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' => '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, or 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_'),
];

34
config/cors.php Normal file
View File

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

151
config/database.php Normal file
View File

@ -0,0 +1,151 @@
<?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 all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'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('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'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 in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| 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 APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'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'),
],
],
];

76
config/filesystems.php Normal file
View File

@ -0,0 +1,76 @@
<?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. Just store away!
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been set up for each driver as an example of the required values.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => 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,
],
],
/*
|--------------------------------------------------------------------------
| 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'),
],
];

52
config/hashing.php Normal file
View File

@ -0,0 +1,52 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 65536,
'threads' => 1,
'time' => 4,
],
];

122
config/logging.php Normal file
View File

@ -0,0 +1,122 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'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' => false,
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
],
'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'),
],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

118
config/mail.php Normal file
View File

@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup
| and used as needed; however, this mailer will be used by default.
|
*/
'default' => env('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
| 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 to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
| "postmark", "log", "array", "failover"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
],
'postmark' => [
'transport' => 'postmark',
],
'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',
],
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails 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 e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];

93
config/queue.php Normal file
View File

@ -0,0 +1,93 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'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' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];

67
config/sanctum.php Normal file
View File

@ -0,0 +1,67 @@
<?php
use Laravel\Sanctum\Sanctum;
return [
/*
|--------------------------------------------------------------------------
| Stateful Domains
|--------------------------------------------------------------------------
|
| Requests from the following domains / hosts will receive stateful API
| authentication cookies. Typically, these should include your local
| and production domains which access your API via a frontend SPA.
|
*/
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort()
))),
/*
|--------------------------------------------------------------------------
| Sanctum Guards
|--------------------------------------------------------------------------
|
| This array contains the authentication guards that will be checked when
| Sanctum is trying to authenticate a request. If none of these guards
| are able to authenticate the request, Sanctum will use the bearer
| token that's present on an incoming request for authentication.
|
*/
'guard' => ['web'],
/*
|--------------------------------------------------------------------------
| Expiration Minutes
|--------------------------------------------------------------------------
|
| This value controls the number of minutes until an issued token will be
| considered expired. If this value is null, personal access tokens do
| not expire. This won't tweak the lifetime of first-party sessions.
|
*/
'expiration' => null,
/*
|--------------------------------------------------------------------------
| Sanctum Middleware
|--------------------------------------------------------------------------
|
| When authenticating your first-party SPA with Sanctum you may need to
| customize some of the middleware Sanctum uses while processing the
| request. You may change the middleware listed below as required.
|
*/
'middleware' => [
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
],
];

34
config/services.php Normal file
View File

@ -0,0 +1,34 @@
<?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.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'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'),
],
];

201
config/session.php Normal file
View File

@ -0,0 +1,201 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| 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 immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'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 we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| While using one of the framework's cache driven session backends you may
| list a cache store that should be used for these sessions. This value
| must match with one of the application's configured 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 cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'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 are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'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. You are free to modify this option if needed.
|
*/
'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" since this is a secure default value.
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => 'lax',
];

36
config/view.php Normal file
View File

@ -0,0 +1,36 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
];

1
database/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.sqlite*

View File

@ -0,0 +1,40 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*
* @return static
*/
public function unverified()
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View File

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->string('nope');
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('role');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
};

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
};

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failed_jobs');
}
};

View File

@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('personal_access_tokens');
}
};

View File

@ -0,0 +1,34 @@
p<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('penyakits', function (Blueprint $table) {
$table->string('penyakitId')->primary();
$table->string('penyakit', 100);
$table->text('deskripsi');
$table->text('solusi');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('penyakits');
}
};

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gejalas', function (Blueprint $table) {
$table->string('gejalaId')->primary();
$table->string('gejala', 100);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('gejalas');
}
};

View File

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bobots', function (Blueprint $table) {
$table->string('bobotId')->primary();
$table->string('bobot', 40);
$table->float('nilai');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bobots');
}
};

View File

@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rules', function (Blueprint $table) {
$table->id();
$table->string('penyakitId');
$table->string('gejalaId');
$table->float('nilaiPakar');
$table->float('belief');
$table->timestamps();
// Relation
$table->foreign('penyakitId')
->references('penyakitId')
->on('penyakits')
->cascadeOnDelete()
->cascadeOnUpdate();
$table->foreign('gejalaId')
->references('gejalaId')
->on('gejalas')
->cascadeOnDelete()
->cascadeOnUpdate();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rules');
}
};

View File

@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('diagnosas', function (Blueprint $table) {
$table->string('diagnosaId')->primary();
$table->unsignedBigInteger('userId');
$table->string('penyakitId');
$table->float('probabilitas');
$table->timestamps();
// Relation
$table->foreign('penyakitId')
->references('penyakitId')
->on('penyakits')
->cascadeOnDelete()
->cascadeOnUpdate();
$table->foreign('userId')
->references('id')
->on('users')
->cascadeOnDelete()
->cascadeOnUpdate();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('diagnosas');
}
};

View File

@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('diagnosa_details', function (Blueprint $table) {
$table->id();
$table->string('diagnosaId');
$table->string('gejalaId');
$table->float('nilaiKeyakinan');
$table->timestamps();
// Relation
$table->foreign('diagnosaId')
->references('diagnosaId')
->on('diagnosas')
->cascadeOnDelete()
->cascadeOnUpdate();
$table->foreign('gejalaId')
->references('gejalaId')
->on('gejalas')
->cascadeOnDelete()
->cascadeOnUpdate();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('diagnosa_details');
}
};

View File

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kontaks', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->string('email');
$table->string('nope');
$table->string('subjek');
$table->text('pesan');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('kontaks');
}
};

View File

@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('informasis', function (Blueprint $table) {
$table->id();
$table->string('penyakitId');
$table->string('judul');
$table->string('slug');
$table->string('gambar');
$table->string('penulis');
$table->longText('artikel');
$table->timestamps();
// Relation
$table->foreign('penyakitId')
->references('penyakitId')
->on('penyakits')
->cascadeOnDelete()
->cascadeOnUpdate();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('informasis');
}
};

View File

@ -0,0 +1,57 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class BobotSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('bobots')->insert([
[
'bobotId' => 'BBID-01',
'bobot' => 'Sangat Yakin',
'nilai' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'bobotId' => 'BBID-02',
'bobot' => 'Yakin',
'nilai' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'bobotId' => 'BBID-03',
'bobot' => 'Cukup Yakin',
'nilai' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'bobotId' => 'BBID-04',
'bobot' => 'Sedikit Yakin',
'nilai' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'bobotId' => 'BBID-05',
'bobot' => 'Tidak Tahu',
'nilai' => '0.05',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
]);
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call([
UserSeeder::class,
BobotSeeder::class,
PenyakitSeeder::class,
GejalaSeeder::class,
RuleSeeder::class,
InformasiSeeder::class,
]);
}
}

View File

@ -0,0 +1,418 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class GejalaSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('gejalas')->insert([
[
'gejalaId' => 'GJID-001',
'gejala' => 'Demam Tinggi',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-002',
'gejala' => 'Ngos-Ngosan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-003',
'gejala' => 'Keluar Air Mata',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-004',
'gejala' => 'Keluar Air Liur',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-005',
'gejala' => 'Pincang',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-006',
'gejala' => 'Ambruk',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-007',
'gejala' => 'Diare Berair',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-008',
'gejala' => 'Dehidrasi',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-009',
'gejala' => 'Kembung',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-010',
'gejala' => 'Kelesuhan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-011',
'gejala' => 'Bisul-Bisul Kulit Disekitar Mulut',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-012',
'gejala' => 'Lepuh',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-013',
'gejala' => 'Leleran Kental Pada Mata',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-014',
'gejala' => 'Leleran Kental Pada Hidung',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-015',
'gejala' => 'Kekeruhan Kornea Pada Mata',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-016',
'gejala' => 'Luka Pada Kuku',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-017',
'gejala' => 'Kuku Lepas',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-018',
'gejala' => 'Luka Pada Mulut atau Sariawan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-019',
'gejala' => 'Benjolan Kulit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-020',
'gejala' => 'Luka Pada Kulit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-021',
'gejala' => 'Leleran Mata dan Hidung',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-022',
'gejala' => 'Keluar Darah Pada Hidung dan Telinga',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-023',
'gejala' => 'Keluar Darah Pada Anus',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-024',
'gejala' => 'Keluron atau Keguguran',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-025',
'gejala' => 'Ambing Membengkak',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-026',
'gejala' => 'Diare Bewarna Kuning Keputihan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-027',
'gejala' => 'Reaksi Nyeri Pada Perut',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-028',
'gejala' => 'Kesakitan Saat Diperah',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-029',
'gejala' => 'Selaput Mata Merah',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-030',
'gejala' => 'Kekeruhan Pada Kornea Mata',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-031',
'gejala' => 'Diare',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-032',
'gejala' => 'Leleran Hidung dan Bau',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-033',
'gejala' => 'Gangguan Pernafasan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-034',
'gejala' => 'Kekakuan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-035',
'gejala' => 'Kekejangan Berlebih',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-036',
'gejala' => 'Kelukaan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-037',
'gejala' => 'Batuk Berlendir',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-038',
'gejala' => 'Batuk Berdarah',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-039',
'gejala' => 'Kesulitan Bernafas',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-040',
'gejala' => 'Keropeng Kulit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-041',
'gejala' => 'Bersisik atau Berkerak',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-042',
'gejala' => 'Gatal-Gatal',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-043',
'gejala' => 'Bulu Berdiri dan Kusam',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-044',
'gejala' => 'Kotoran Ada Cacing',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-045',
'gejala' => 'Luka Basah',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-046',
'gejala' => 'Bengkak Cairan Pada Dagu atau Bawah Perut',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-047',
'gejala' => 'Luka Kulit Sudut Mata',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-048',
'gejala' => 'Mata Berair',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-049',
'gejala' => 'Luka Belatung',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-050',
'gejala' => 'Gerakan Berputar-Putar',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-051',
'gejala' => 'Kekurusan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-052',
'gejala' => 'Mata Melotot',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-053',
'gejala' => 'Tidak Bisa Mengeluarkan Anak',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-054',
'gejala' => 'Tidak Mampu Berdiri',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-055',
'gejala' => 'Pembengkakan Vulva',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-056',
'gejala' => 'Keluarnya Cairan yang Tidak Biasa',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-057',
'gejala' => 'Keluar Kandungan Setelah Melahirkan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-058',
'gejala' => 'Terdapat Pendarahan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-059',
'gejala' => 'Lemah',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-060',
'gejala' => 'Keluar Vagina Sebelum atau Sesudah Melahirkan',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-061',
'gejala' => 'Birahi Terus-Menerus',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-062',
'gejala' => 'Gelisah',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-063',
'gejala' => 'Mengendus Bagian Belakang Sapi',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-064',
'gejala' => 'Terdapat Caplak Pada Kulit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-065',
'gejala' => 'Iritasi',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'gejalaId' => 'GJID-066',
'gejala' => 'Menggosok-Gosok Badannya',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
]);
}
}

View File

@ -0,0 +1,304 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
class InformasiSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('informasis')->insert([
[
'penyakitId' => 'PKID-01',
'judul' => 'BEF (Bovine Ephemeral Fever): Demam Ephemeral pada Sapi dan Cara Penanganannya',
'slug' => Str::slug('BEF (Bovine Ephemeral Fever): Demam Ephemeral pada Sapi dan Cara Penanganannya'),
'gambar' => 'gambar-testing-1.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Bovine Ephemeral Fever (BEF), juga dikenal sebagai "demam tiga hari," adalah penyakit virus yang menyerang sapi dan menyebabkan demam tinggi, kekakuan otot, dan kehilangan nafsu makan secara tiba-tiba. Penyakit ini biasanya berlangsung selama tiga hari, setelah itu sapi akan pulih dengan sendirinya. Namun, efek penyakit ini bisa sangat melemahkan, terutama pada sapi perah yang produktivitasnya bisa terganggu akibat kehilangan nafsu makan dan penurunan produksi susu.</p> <p>Penularan BEF terjadi melalui gigitan serangga, terutama nyamuk dan lalat, yang bertindak sebagai vektor virus. Oleh karena itu, pengendalian populasi serangga dan vaksinasi merupakan langkah pencegahan yang penting. Pada artikel ini, kita akan membahas lebih lanjut tentang gejala BEF, cara penularannya, serta langkah-langkah pencegahan dan pengobatan yang efektif untuk mengurangi dampak penyakit ini pada peternakan sapi Anda.</p> <h2>BEF (Bovine Ephemeral Fever): Mengatasi Demam 3 Hari pada Sapi</h2> <h3>Apa itu BEF?</h3> <p>Bovine Ephemeral Fever (BEF), juga dikenal sebagai demam tiga hari, adalah penyakit virus akut pada sapi yang disebabkan oleh Rhabdovirus. Penyakit ini ditandai dengan demam mendadak, penurunan nafsu makan, dan kekakuan pada sendi yang biasanya berlangsung selama tiga hari.</p> <h3>Gejala BEF</h3> <p>Gejala utama BEF termasuk demam tinggi, depresi, kehilangan nafsu makan, dan kekakuan sendi. Sapi yang terinfeksi mungkin juga mengalami penurunan produksi susu dan pembengkakan sendi.</p> <h3>Penyebaran dan Pencegahan</h3> <p>BEF disebarkan oleh vektor serangga seperti nyamuk dan lalat. Pencegahan melibatkan kontrol vektor dan vaksinasi rutin. Peternak juga harus memastikan lingkungan ternak tetap bersih untuk mengurangi populasi vektor.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-02',
'judul' => 'Menghadapi Diare Ganas pada Sapi: Penyebab dan Solusi Efektif',
'slug' => Str::slug('Menghadapi Diare Ganas pada Sapi: Penyebab dan Solusi Efektif'),
'gambar' => 'gambar-testing-2.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Diare ganas pada sapi merupakan salah satu masalah kesehatan yang sering kali mengakibatkan kematian, terutama pada anak sapi. Penyakit ini ditandai dengan diare parah, dehidrasi, dan penurunan berat badan yang cepat. Penyebab diare ganas bisa beragam, termasuk infeksi bakteri, virus, parasit, atau bahkan faktor nutrisi yang buruk.</p> <p>Mengatasi diare ganas memerlukan pendekatan yang komprehensif, termasuk diagnosis yang tepat, pemberian antibiotik atau antiparasit, serta perbaikan kondisi sanitasi dan nutrisi di peternakan. Artikel ini akan menguraikan berbagai penyebab diare ganas pada sapi, gejala yang perlu diwaspadai, serta langkah-langkah pencegahan dan pengobatan untuk meminimalkan kerugian akibat penyakit ini.</p> <h2>Diare Ganas pada Sapi: Mengatasi Infeksi yang Mematikan</h2> <h3>Penyebab dan Gejala</h3> <p>Diare ganas pada sapi biasanya disebabkan oleh infeksi bakteri, virus, atau parasit. Gejala termasuk diare berair, dehidrasi, dan penurunan nafsu makan, yang dapat mengakibatkan kematian jika tidak segera diobati.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan feses dan gejala klinis. Pengobatan melibatkan pemberian antibiotik atau antiparasit sesuai dengan penyebab infeksi, serta rehidrasi untuk mengatasi dehidrasi.</p> <h3>Pencegahan dan Manajemen</h3> <p>Pencegahan diare ganas melibatkan manajemen kebersihan yang baik, vaksinasi, dan pemberian pakan yang berkualitas. Isolasi sapi yang terinfeksi juga penting untuk mencegah penyebaran penyakit.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-03',
'judul' => 'Mengenal ORF: Penyakit Kulit Menular pada Sapi dan Ternak',
'slug' => Str::slug('Mengenal ORF: Penyakit Kulit Menular pada Sapi dan Ternak'),
'gambar' => 'gambar-testing-3.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>ORF, juga dikenal sebagai contagious ecthyma, adalah penyakit kulit menular yang disebabkan oleh virus dari keluarga Poxviridae. Penyakit ini umumnya menyerang sapi, kambing, dan domba, menyebabkan lesi dan koreng pada kulit, terutama di sekitar mulut, bibir, dan hidung. Meskipun tidak biasanya berakibat fatal, ORF dapat menyebabkan ketidaknyamanan yang signifikan dan mengganggu kemampuan makan ternak.</p> <p>Penularan ORF terjadi melalui kontak langsung dengan hewan yang terinfeksi atau benda yang terkontaminasi virus. Karena itu, pengendalian infeksi sangat penting untuk mencegah penyebaran penyakit ini. Dalam artikel ini, kita akan membahas penyebab, gejala, dan cara penularan ORF, serta strategi efektif untuk mencegah dan mengobati penyakit ini di peternakan.</p> <h2>ORF pada Sapi: Mengendalikan Infeksi Virus pada Kulit</h2> <h3>Apa itu ORF?</h3> <p>ORF, juga dikenal sebagai contagious ecthyma, adalah penyakit kulit yang disebabkan oleh Parapoxvirus. Penyakit ini biasanya menyerang anak sapi dan ditandai dengan lesi kulit yang berkerak dan nyeri di sekitar mulut dan kaki.</p> <h3>Gejala dan Dampak</h3> <p>Gejala ORF meliputi munculnya lesi berkerak pada bibir, mulut, dan kaki. Lesi ini bisa sangat menyakitkan, mengganggu makan, dan menyebabkan penurunan berat badan serta kesehatan umum yang buruk.</p> <h3>Pencegahan dan Pengobatan</h3> <p>Pencegahan melibatkan vaksinasi dan isolasi hewan yang terinfeksi. Pengobatan biasanya bersifat suportif, termasuk menjaga kebersihan area yang terkena dan memberikan antibiotik untuk mencegah infeksi sekunder.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-04',
'judul' => 'Malignant Catarrhal Fever (Penyakit Ingusan): Ancaman Serius Penyakit Ingusan pada Sapi',
'slug' => Str::slug('Malignant Catarrhal Fever (Penyakit Ingusan): Ancaman Serius Penyakit Ingusan pada Sapi'),
'gambar' => 'gambar-testing-4.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Malignant Catarrhal Fever (MCF) atau penyakit ingusan merupakan penyakit virus yang sangat mematikan pada sapi, yang ditandai dengan demam tinggi, lesi di saluran pernapasan, dan ulserasi pada mulut serta mata. Penyakit ini disebabkan oleh herpesvirus yang biasanya menjangkiti domba dan kerbau tanpa menunjukkan gejala, namun bisa sangat mematikan saat menular ke sapi.</p> <p>Penyebaran MCF seringkali terjadi melalui kontak tidak langsung dengan hewan pembawa virus seperti domba. Sapi yang terinfeksi MCF seringkali tidak menunjukkan tanda-tanda penyakit hingga gejala muncul secara tiba-tiba dan parah. Artikel ini akan membahas lebih dalam mengenai gejala-gejala MCF, cara penularan, dan langkah-langkah pencegahan yang dapat diambil untuk melindungi ternak sapi dari penyakit yang mematikan ini.</p> <h2>Maglinant Catarrhal Fever: Penyakit Ingusan yang Berbahaya</h2> <h3>Penyebab dan Gejala</h3> <p>Maglinant Catarrhal Fever (MCF) adalah penyakit viral yang disebabkan oleh virus herpes dari keluarga Herpesviridae. Gejala termasuk demam tinggi, keluarnya cairan dari hidung dan mata, serta ulserasi pada mulut dan hidung.</p> <h3>Penularan dan Risiko</h3> <p>MCF biasanya ditularkan melalui kontak dengan domba atau kambing yang terinfeksi. Penyakit ini sangat fatal bagi sapi dan tidak ada pengobatan yang efektif selain suportif.</p> <h3>Pencegahan</h3> <p>Pencegahan utama adalah memisahkan sapi dari domba atau kambing yang terinfeksi. Vaksinasi belum tersedia secara luas, sehingga manajemen ternak yang baik sangat penting.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'judul' => 'Penyakit Mulut dan Kuku (PMK): Penyakit Mulut dan Kuku pada Sapi, Gejala, dan Pencegahannya',
'slug' => Str::slug('Penyakit Mulut dan Kuku (PMK): Penyakit Mulut dan Kuku pada Sapi, Gejala, dan Pencegahannya'),
'gambar' => 'gambar-testing-5.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Penyakit Mulut dan Kuku (PMK) adalah penyakit viral yang sangat menular, yang menyerang hewan berkuku belah seperti sapi, domba, kambing, dan babi. Penyakit ini ditandai dengan munculnya vesikel dan ulserasi di mulut dan sekitar kuku, menyebabkan hewan mengalami demam, penurunan berat badan, dan kesulitan makan dan berjalan. PMK dapat menyebar dengan cepat melalui kontak langsung maupun melalui udara, membuatnya sangat sulit untuk dikendalikan.</p> <p>Dampak ekonomi dari PMK sangat besar, terutama karena penurunan produktivitas hewan dan pembatasan perdagangan ternak yang terinfeksi. Artikel ini akan membahas gejala-gejala yang harus diwaspadai, cara penularan PMK, serta strategi pencegahan dan pengendalian yang efektif untuk meminimalkan risiko dan dampak dari penyakit ini pada peternakan sapi.</p> <h2>PMK: Penyakit Mulut dan Kuku pada Sapi</h2> <h3>Apa itu PMK?</h3> <p>Penyakit Mulut dan Kuku (PMK) adalah penyakit viral yang sangat menular pada hewan berkuku genap, termasuk sapi. Penyakit ini disebabkan oleh virus dari keluarga Picornaviridae.</p> <h3>Gejala PMK</h3> <p>Gejala PMK meliputi demam, lepuhan pada mulut dan kuku, air liur berlebihan, dan kesulitan berjalan. Penyakit ini dapat menyebabkan penurunan produksi susu dan daging.</p> <h3>Pencegahan dan Pengendalian</h3> <p>Pencegahan PMK melibatkan vaksinasi rutin, kontrol lalu lintas hewan, dan biosekuriti yang ketat di peternakan. Isolasi hewan yang terinfeksi juga sangat penting untuk mencegah penyebaran virus.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-06',
'judul' => 'Lumpy Skin Disease (LSD): Waspadai Penyakit Kulit Berbahaya pada Sapi',
'slug' => Str::slug('Lumpy Skin Disease (LSD): Waspadai Penyakit Kulit Berbahaya pada Sapi'),
'gambar' => 'gambar-testing-6.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Lumpy Skin Disease (LSD) adalah penyakit viral yang disebabkan oleh capripoxvirus, yang menyerang sapi dan menyebabkan nodul-nodul keras pada kulit, demam, dan penurunan kondisi tubuh secara umum. Penyakit ini biasanya disebarkan melalui gigitan serangga seperti lalat dan nyamuk, serta melalui kontak langsung dengan hewan yang terinfeksi.</p> <p>LSD dapat menyebabkan kerugian ekonomi yang signifikan karena penurunan produksi susu, pertumbuhan yang terhambat, dan kematian pada sapi yang terinfeksi parah. Artikel ini akan mengulas gejala dan penyebab LSD, serta langkah-langkah pencegahan dan pengobatan yang dapat dilakukan untuk melindungi ternak sapi dari ancaman penyakit ini.</p> <h2>LSD: Lumpy Skin Disease pada Sapi</h2> <h3>Gejala dan Penyebab</h3> <p>Lumpy Skin Disease (LSD) adalah penyakit viral yang disebabkan oleh virus Poxviridae. Gejala utama termasuk munculnya nodul pada kulit, demam, dan penurunan produksi susu.</p> <h3>Penyebaran dan Dampak</h3> <p>Penyebaran LSD terjadi melalui gigitan serangga seperti nyamuk dan lalat. Penyakit ini dapat menyebabkan kerusakan kulit permanen dan penurunan produktivitas ternak.</p> <h3>Pengendalian dan Pengobatan</h3> <p>Pengendalian LSD melibatkan vaksinasi, pengendalian vektor, dan isolasi hewan yang terinfeksi. Pengobatan bersifat suportif, termasuk pengelolaan luka dan pemberian antibiotik untuk mencegah infeksi sekunder.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-07',
'judul' => 'Anthraks (Radang Limpa): Radang Limpa yang Mematikan dan Cara Pencegahannya',
'slug' => Str::slug('Anthraks (Radang Limpa): Radang Limpa yang Mematikan dan Cara Pencegahannya'),
'gambar' => 'gambar-testing-7.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Anthraks adalah penyakit bakteri yang sangat mematikan pada sapi, disebabkan oleh Bacillus anthracis. Penyakit ini ditandai dengan gejala seperti demam tinggi, pembengkakan pada limpa, dan sering kali kematian mendadak tanpa tanda-tanda yang jelas sebelumnya. Anthraks dapat menyebar melalui spora bakteri yang tahan lama di tanah, membuatnya sulit untuk diberantas sepenuhnya.</p> <p>Penanganan dan pencegahan anthraks memerlukan tindakan yang cepat dan tepat, termasuk vaksinasi rutin dan pengelolaan sanitasi yang ketat di peternakan. Artikel ini akan membahas lebih lanjut tentang gejala anthraks pada sapi, cara penularannya, serta langkah-langkah yang dapat diambil untuk mencegah dan mengendalikan penyakit ini agar tidak menyebar luas.</p> <h2>Anthraks pada Sapi: Mengatasi Radang Limpa yang Mematikan</h2> <h3>Apa itu Anthraks?</h3> <p>Anthraks adalah penyakit bakteri akut yang disebabkan oleh Bacillus anthracis. Penyakit ini dapat menyerang sapi dan hewan lainnya, serta bisa menular ke manusia.</p> <h3>Gejala dan Penyebaran</h3> <p>Gejala anthraks meliputi demam tinggi, pembengkakan limpa, dan kematian mendadak. Penyebaran terjadi melalui spora bakteri yang dapat bertahan lama di lingkungan.</p> <h3>Pencegahan dan Pengendalian</h3> <p>Pencegahan anthraks melibatkan vaksinasi rutin dan pengelolaan lingkungan yang baik untuk mencegah kontaminasi. Isolasi dan pemusnahan hewan yang terinfeksi juga penting untuk mengendalikan wabah.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-08',
'judul' => 'Brucellosis (Keguguran): Penyebab Keguguran dan Upaya Pengendalian',
'slug' => Str::slug('Brucellosis (Keguguran): Penyebab Keguguran dan Upaya Pengendalian'),
'gambar' => 'gambar-testing-8.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Brucellosis adalah penyakit bakteri menular yang terutama menyebabkan keguguran pada sapi betina dan dapat menginfeksi manusia. Penyakit ini disebabkan oleh bakteri Brucella spp., yang bisa menyebar melalui kontak langsung dengan hewan yang terinfeksi atau produk hewani yang terkontaminasi. Brucellosis pada sapi sering kali menyebabkan keguguran pada akhir kebuntingan dan dapat mengakibatkan infertilitas.</p> <p>Pengendalian brucellosis melibatkan pengujian rutin dan eliminasi hewan yang terinfeksi, serta vaksinasi di daerah yang endemik. Artikel ini akan mengupas tuntas mengenai gejala-gejala brucellosis pada sapi, cara penyebarannya, dan berbagai upaya pengendalian yang dapat dilakukan untuk mencegah penyebaran penyakit ini di peternakan.</p> <h2>Brucellosis pada Sapi: Mengatasi Penyebab Keguguran</h2> <h3>Penyebab dan Dampak</h3> <p>Brucellosis adalah penyakit bakteri yang disebabkan oleh Brucella spp., yang dapat menyebabkan keguguran pada sapi betina. Penyakit ini juga bisa menular ke manusia melalui kontak dengan hewan atau produk hewani yang terkontaminasi.</p> <h3>Gejala dan Diagnosis</h3> <p>Gejala utama brucellosis termasuk keguguran, retensi plasenta, dan infertilitas. Diagnosis dilakukan melalui pengujian laboratorium pada sampel darah atau jaringan.</p> <h3>Pencegahan dan Pengendalian</h3> <p>Pencegahan melibatkan vaksinasi dan manajemen reproduksi yang baik. Pengendalian juga melibatkan pengujian rutin dan pemusnahan hewan yang terinfeksi untuk mencegah penyebaran.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-09',
'judul' => 'Colibacillosis pada Sapi: Penyakit Bakteri dan Langkah Penanganannya',
'slug' => Str::slug('Colibacillosis pada Sapi: Penyakit Bakteri dan Langkah Penanganannya'),
'gambar' => 'gambar-testing-9.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Colibacillosis adalah infeksi bakteri yang disebabkan oleh Escherichia coli, yang dapat menyerang anak sapi dan menyebabkan diare berat, dehidrasi, dan kematian jika tidak ditangani dengan cepat. Penyakit ini sering kali terjadi pada anak sapi yang baru lahir dan memiliki sistem kekebalan tubuh yang belum sepenuhnya berkembang, terutama jika kondisi sanitasi di peternakan kurang memadai.</p> <p>Penanganan colibacillosis memerlukan kombinasi pemberian antibiotik, terapi rehidrasi, dan perbaikan manajemen sanitasi di peternakan. Artikel ini akan membahas gejala colibacillosis, cara penularan, dan langkah-langkah yang dapat diambil untuk mencegah dan mengobati penyakit ini, guna memastikan kesehatan dan kesejahteraan anak sapi di peternakan Anda.</p> <h2>Colibacillosis pada Sapi: Mengatasi Infeksi Bakteri pada Anak Sapi</h2> <h3>Penyebab dan Gejala</h3> <p>Colibacillosis adalah infeksi bakteri yang disebabkan oleh Escherichia coli, yang sering menyerang anak sapi yang baru lahir. Gejala termasuk diare berair, dehidrasi, dan penurunan nafsu makan.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan feses dan gejala klinis. Pengobatan melibatkan pemberian antibiotik dan terapi cairan untuk mengatasi dehidrasi.</p> <h3>Pencegahan</h3> <p>Pencegahan colibacillosis melibatkan manajemen kebersihan yang baik, kolostrum yang cukup untuk anak sapi baru lahir, dan vaksinasi jika tersedia.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-10',
'judul' => 'Mastitis (Radang Ambing): Penyebab, Gejala, dan Pengobatan Radang Ambing',
'slug' => Str::slug('Mastitis (Radang Ambing): Penyebab, Gejala, dan Pengobatan Radang Ambing'),
'gambar' => 'gambar-testing-10.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Mastitis adalah peradangan pada ambing (kelenjar susu) sapi yang biasanya disebabkan oleh infeksi bakteri. Penyakit ini dapat mengakibatkan penurunan produksi susu, perubahan kualitas susu, dan rasa sakit yang signifikan bagi sapi. Mastitis merupakan salah satu masalah kesehatan utama di industri peternakan sapi perah, yang dapat berdampak besar pada produktivitas dan kesejahteraan hewan.</p> <p>Pengendalian mastitis melibatkan praktik manajemen yang baik, termasuk kebersihan saat pemerahan, identifikasi dini gejala, dan pengobatan yang tepat. Artikel ini akan membahas berbagai aspek mastitis pada sapi, mulai dari penyebab dan gejalanya hingga langkah-langkah pencegahan dan pengobatan yang efektif untuk mengendalikan penyakit.</p> <h2>Mastitis pada Sapi: Menangani Radang Ambing dengan Efektif</h2> <h3>Penyebab dan Gejala</h3> <p>Mastitis adalah peradangan pada ambing sapi yang biasanya disebabkan oleh infeksi bakteri. Gejala termasuk pembengkakan, kemerahan, dan keluarnya cairan abnormal dari ambing.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan fisik dan tes laboratorium pada sampel susu. Pengobatan melibatkan pemberian antibiotik dan manajemen kesehatan ambing yang baik.</p> <h3>Pencegahan</h3> <p>Pencegahan mastitis melibatkan kebersihan yang baik selama proses pemerahan, manajemen stres yang tepat, dan vaksinasi jika tersedia.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-11',
'judul' => 'Pink Eye (Radang Mata): Pencegahan dan Pengobatan Radang Mata',
'slug' => Str::slug('Pink Eye (Radang Mata): Pencegahan dan Pengobatan Radang Mata'),
'gambar' => 'gambar-testing-11.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Pink Eye, atau konjungtivitis infeksiosa, adalah penyakit mata yang sangat menular pada sapi, yang disebabkan oleh bakteri Moraxella bovis. Penyakit ini ditandai dengan peradangan pada konjungtiva, pembengkakan, dan keluarnya cairan dari mata. Jika tidak segera diobati, pink eye dapat menyebabkan kebutaan sementara atau permanen, yang berdampak pada kesejahteraan dan produktivitas sapi.</p> <p>Penyebaran pink eye biasanya terjadi melalui kontak langsung atau vektor seperti lalat. Pencegahan dan pengobatan melibatkan kontrol populasi lalat, pengobatan antibiotik, dan manajemen kebersihan di peternakan. Artikel ini akan mengulas penyebab, gejala, dan langkah-langkah pencegahan dan pengobatan pink eye, untuk membantu peternak menjaga kesehatan mata ternak mereka.</p> <h2>Pink Eye pada Sapi: Mengatasi Radang Mata yang Menyakitkan</h2> <h3>Penyebab dan Gejala</h3> <p>Pink eye, atau keratoconjunctivitis, adalah peradangan pada mata sapi yang disebabkan oleh infeksi bakteri atau virus. Gejala termasuk kemerahan, bengkak, dan keluarnya cairan dari mata.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan fisik mata dan gejala klinis. Pengobatan melibatkan pemberian antibiotik atau antiviral dan menjaga kebersihan mata.</p> <h3>Pencegahan</h3> <p>Pencegahan pink eye melibatkan manajemen kebersihan yang baik, kontrol serangga, dan isolasi hewan yang terinfeksi untuk mencegah penyebaran penyakit.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-12',
'judul' => 'Salmonellosis pada Sapi: Mengenali Gejala dan Mengambil Tindakan Cepat',
'slug' => Str::slug('Salmonellosis pada Sapi: Mengenali Gejala dan Mengambil Tindakan Cepat'),
'gambar' => 'gambar-testing-12.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Salmonellosis adalah penyakit infeksi bakteri yang disebabkan oleh Salmonella spp., yang dapat menyerang sapi dari segala usia, namun paling sering ditemukan pada anak sapi. Gejala salmonellosis meliputi diare, demam, dan penurunan nafsu makan, yang bisa berakibat fatal jika tidak ditangani dengan cepat dan tepat. Penyakit ini juga bisa menular ke manusia, membuatnya menjadi masalah kesehatan yang signifikan di peternakan.</p> <p>Pengendalian salmonellosis melibatkan praktik kebersihan yang baik, pengelolaan pakan yang aman, dan penggunaan antibiotik sesuai dengan rekomendasi dokter hewan. Artikel ini akan membahas lebih lanjut mengenai gejala, penyebaran, dan langkah-langkah pengendalian salmonellosis pada sapi, serta tindakan yang dapat diambil untuk melindungi ternak dan pekerja di peternakan.</p> <h2>Salmonellosis pada Sapi: Mencegah Infeksi Bakteri yang Serius</h2> <h3>Penyebab dan Gejala</h3> <p>Salmonellosis adalah infeksi bakteri yang disebabkan oleh Salmonella spp. Gejala termasuk diare, demam, dan penurunan nafsu makan, yang dapat menyebabkan dehidrasi dan kematian pada kasus yang parah.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan feses dan tes laboratorium. Pengobatan melibatkan pemberian antibiotik dan terapi cairan untuk mengatasi dehidrasi.</p> <h3>Pencegahan</h3> <p>Pencegahan salmonellosis melibatkan manajemen kebersihan yang baik, vaksinasi, dan kontrol lalu lintas hewan untuk mencegah penyebaran bakteri.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-13',
'judul' => 'Septicemia Epizootica (Penyakit Ngorok): Menangani Penyakit Ngorok pada Sapi',
'slug' => Str::slug('Septicemia Epizootica (Penyakit Ngorok): Menangani Penyakit Ngorok pada Sapi'),
'gambar' => 'gambar-testing-13.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Septicemia epizootica (SE), dikenal juga sebagai penyakit ngorok, adalah penyakit bakteri yang sangat menular pada sapi, disebabkan oleh Pasteurella multocida. Penyakit ini ditandai dengan demam tinggi, kesulitan bernapas, dan keluarnya cairan dari hidung. Jika tidak segera ditangani, penyakit ini dapat menyebabkan kematian mendadak pada sapi.</p> <p>Penularan SE terjadi melalui kontak langsung dengan hewan yang terinfeksi atau melalui udara. Pengendalian penyakit ini melibatkan vaksinasi rutin, manajemen kesehatan ternak yang baik, dan pemberian antibiotik sesuai dengan saran dokter hewan. Artikel ini akan membahas gejala, penyebab, dan langkah-langkah pencegahan serta pengobatan SE, untuk membantu peternak melindungi sapi mereka dari penyakit yang mematikan ini.</p> <h2>Septicemia Epizootica (SE): Mengatasi Penyakit Ngorok pada Sapi</h2> <h3>Penyebab dan Gejala</h3> <p>Septicemia Epizootica (SE), atau penyakit ngorok, adalah infeksi bakteri yang disebabkan oleh Pasteurella multocida. Gejala termasuk demam, kesulitan bernapas, dan keluarnya cairan dari hidung.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan gejala klinis dan tes laboratorium. Pengobatan melibatkan pemberian antibiotik dan manajemen stres yang baik.</p> <h3>Pencegahan</h3> <p>Pencegahan SE melibatkan vaksinasi, manajemen lingkungan yang baik, dan isolasi hewan yang terinfeksi untuk mencegah penyebaran penyakit.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-14',
'judul' => 'Tetanus pada Sapi: Penyebab, Pencegahan, dan Pengobatan',
'slug' => Str::slug('Tetanus pada Sapi: Penyebab, Pencegahan, dan Pengobatan'),
'gambar' => 'gambar-testing-14.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Tetanus adalah penyakit bakteri yang disebabkan oleh Clostridium tetani, yang dapat menyerang sapi melalui luka terbuka. Bakteri ini menghasilkan toksin yang mempengaruhi sistem saraf, menyebabkan kekakuan otot, kesulitan bergerak, dan dalam kasus yang parah, kematian. Tetanus bisa terjadi setelah proses kelahiran, kastrasi, atau cedera lainnya yang menyebabkan luka terbuka.</p> <p>Pencegahan tetanus melibatkan vaksinasi rutin dan perawatan luka yang baik. Artikel ini akan menguraikan penyebab tetanus pada sapi, gejala yang perlu diwaspadai, serta langkah-langkah pencegahan dan pengobatan yang dapat diambil untuk melindungi ternak dari penyakit ini.</p> <h2>Tetanus pada Sapi: Mencegah Penyakit Mematikan yang Menyerang Saraf</h2> <h3>Penyebab dan Gejala</h3> <p>Tetanus adalah penyakit bakteri yang disebabkan oleh Clostridium tetani, yang menghasilkan toksin yang menyerang sistem saraf. Gejala termasuk kekakuan otot, kejang, dan kesulitan makan.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan gejala klinis dan riwayat luka. Pengobatan melibatkan pemberian antitoksin, antibiotik, dan perawatan suportif untuk mengelola gejala.</p> <h3>Pencegahan</h3> <p>Pencegahan tetanus melibatkan vaksinasi rutin dan perawatan luka yang baik untuk mencegah infeksi bakteri.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-15',
'judul' => 'Tuberkulosis Sapi (TBC Sapi): Ancaman Kesehatan yang Perlu Diwaspadai',
'slug' => Str::slug('Tuberkulosis Sapi (TBC Sapi): Ancaman Kesehatan yang Perlu Diwaspadai'),
'gambar' => 'gambar-testing-15.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Tuberkulosis sapi (TBC sapi) adalah penyakit bakteri kronis yang disebabkan oleh Mycobacterium bovis, yang juga dapat menular ke manusia dan hewan lainnya. Penyakit ini sering kali berkembang lambat, dengan gejala seperti batuk kronis, penurunan berat badan, dan penurunan produksi susu. Tuberkulosis merupakan ancaman serius bagi kesehatan ternak dan manusia, serta dapat menyebabkan kerugian ekonomi yang besar.</p> <p>Deteksi dini dan pengendalian tuberkulosis melibatkan pengujian rutin, isolasi hewan yang terinfeksi, dan pemusnahan jika diperlukan. Artikel ini akan membahas gejala, cara penularan, dan upaya pengendalian tuberkulosis pada sapi, untuk membantu peternak memahami dan mengatasi ancaman penyakit ini.</p> <h2>Tuberkulosis Sapi: Mengatasi TBC pada Hewan Ternak</h2> <h3>Penyebab dan Gejala</h3> <p>Tuberkulosis pada sapi disebabkan oleh Mycobacterium bovis. Gejala termasuk batuk, penurunan berat badan, dan penurunan produksi susu. Penyakit ini dapat menular ke manusia melalui produk susu yang tidak dipasteurisasi.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui tes kulit tuberkulin dan pemeriksaan laboratorium. Pengobatan biasanya tidak efektif, sehingga sapi yang terinfeksi biasanya harus dimusnahkan untuk mencegah penyebaran.</p> <h3>Pencegahan</h3> <p>Pencegahan tuberkulosis melibatkan pengujian rutin dan pemusnahan hewan yang terinfeksi, serta pengelolaan kebersihan yang baik di peternakan.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-16',
'judul' => 'Ringworm: Infeksi Jamur Kulit dan Cara Mengatasinya',
'slug' => Str::slug('Ringworm: Infeksi Jamur Kulit dan Cara Mengatasinya'),
'gambar' => 'gambar-testing-16.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Ringworm, atau dermatofitosis, adalah infeksi jamur pada kulit sapi yang disebabkan oleh berbagai jenis dermatofit. Penyakit ini ditandai dengan lesi melingkar pada kulit, rambut rontok, dan kadang-kadang gatal. Meskipun tidak fatal, ringworm dapat menyebabkan ketidaknyamanan dan penurunan kualitas kulit serta bulu sapi.</p> <p>Penularan ringworm terjadi melalui kontak langsung dengan hewan yang terinfeksi atau benda yang terkontaminasi spora jamur. Pengendalian penyakit ini melibatkan perawatan antifungal, kebersihan yang baik, dan isolasi hewan yang terinfeksi. Artikel ini akan mengulas gejala, penyebab, dan langkah-langkah pencegahan dan pengobatan ringworm pada sapi, untuk membantu peternak menjaga kesehatan kulit ternak mereka.</p> <h2>Ringworm pada Sapi: Mengatasi Infeksi Jamur yang Menyebalkan</h2> <h3>Penyebab dan Gejala</h3> <p>Ringworm adalah infeksi jamur yang disebabkan oleh dermatofit seperti Trichophyton spp. dan Microsporum spp. Gejala termasuk lesi berbentuk cincin pada kulit, keropeng, dan rambut rontok.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan lesi dan tes laboratorium. Pengobatan melibatkan penggunaan antijamur topikal atau sistemik dan menjaga kebersihan lingkungan ternak.</p> <h3>Pencegahan</h3> <p>Pencegahan ringworm melibatkan manajemen kebersihan yang baik dan isolasi hewan yang terinfeksi untuk mencegah penyebaran infeksi.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-17',
'judul' => 'Ascariasis (Cacingan): Bahaya Cacingan dan Cara Penanggulangannya',
'slug' => Str::slug('Ascariasis (Cacingan): Bahaya Cacingan dan Cara Penanggulangannya'),
'gambar' => 'gambar-testing-17.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Ascariasis adalah infeksi cacing pada sapi yang disebabkan oleh Ascaris spp., yang dapat menyebabkan penurunan berat badan, penurunan nafsu makan, dan gangguan pencernaan. Cacing ini hidup di usus dan dapat menghambat penyerapan nutrisi, mengakibatkan penurunan kesehatan dan produktivitas sapi.</p> <p>Pengendalian ascariasis melibatkan pemberian obat cacing secara rutin dan perbaikan manajemen kebersihan di peternakan. Artikel ini akan membahas lebih lanjut tentang gejala ascariasis, cara penularannya, serta langkah-langkah pencegahan dan pengobatan yang efektif untuk mengendalikan infeksi cacing pada sapi.</p> <h2>Ascariasis pada Sapi: Mengatasi Infeksi Cacing yang Mengganggu</h2> <h3>Penyebab dan Gejala</h3> <p>Ascariasis adalah infeksi cacing usus yang disebabkan oleh Ascaris spp. Gejala termasuk penurunan berat badan, diare, dan penurunan nafsu makan.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan feses untuk mendeteksi telur cacing. Pengobatan melibatkan pemberian obat cacing secara rutin dan manajemen kebersihan yang baik di peternakan.</p> <h3>Pencegahan</h3> <p>Pencegahan ascariasis melibatkan program deworming rutin dan pengelolaan lingkungan yang baik untuk mengurangi kontaminasi dengan telur cacing.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-18',
'judul' => 'Demodecosis (Kudis Menular): Mengenal Kudis Menular dan Penanganannya',
'slug' => Str::slug('Demodecosis (Kudis Menular): Mengenal Kudis Menular dan Penanganannya'),
'gambar' => 'gambar-testing-18.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Demodecosis adalah penyakit kulit menular pada sapi yang disebabkan oleh tungau Demodex. Penyakit ini ditandai dengan munculnya nodul atau pustula pada kulit, rambut rontok, dan gatal. Jika tidak ditangani, demodecosis dapat menyebabkan infeksi sekunder dan penurunan kondisi tubuh sapi.</p> <p>Penularan demodecosis terjadi melalui kontak langsung dengan hewan yang terinfeksi. Pengendalian penyakit ini melibatkan perawatan dengan acaricide, kebersihan yang baik, dan pengelolaan stres pada ternak. Artikel ini akan membahas penyebab, gejala, dan langkah-langkah pencegahan serta pengobatan demodecosis pada sapi, untuk membantu peternak mengatasi penyakit kulit menular ini.</p> <h2>Demodecosis pada Sapi: Mengatasi Kudis Menular yang Menyiksa</h2> <h3>Penyebab dan Gejala</h3> <p>Demodecosis adalah penyakit kulit yang disebabkan oleh infestasi tungau Demodex. Gejala termasuk keropeng, gatal, dan rambut rontok, yang dapat menyebabkan stres dan penurunan berat badan pada sapi.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan mikroskopis kulit. Pengobatan melibatkan penggunaan obat acaricide, kebersihan yang baik, dan pengelolaan stres pada ternak.</p> <h3>Pencegahan</h3> <p>Pencegahan demodecosis melibatkan manajemen kebersihan yang baik dan pengelolaan stres pada sapi untuk menjaga kesehatan kulit yang optimal.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-19',
'judul' => 'Fasciolosis (Penyakit Cacing Hati): Pencegahan dan Pengobatan Penyakit Cacing Hati',
'slug' => Str::slug('Fasciolosis (Penyakit Cacing Hati): Pencegahan dan Pengobatan Penyakit Cacing Hati'),
'gambar' => 'gambar-testing-19.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Fasciolosis adalah penyakit parasit yang disebabkan oleh cacing hati (Fasciola hepatica), yang menyerang hati dan saluran empedu sapi. Penyakit ini dapat menyebabkan penurunan berat badan, penurunan produksi susu, dan kerusakan hati yang parah. Fasciolosis menyebar melalui konsumsi tanaman atau air yang terkontaminasi larva cacing.</p> <p>Pengendalian fasciolosis melibatkan pemberian obat anti-parasit, pengelolaan lahan yang baik, dan pencegahan akses sapi ke area yang terkontaminasi. Artikel ini akan membahas gejala fasciolosis, cara penularannya, serta langkah-langkah pencegahan dan pengobatan yang dapat diambil untuk melindungi sapi dari infeksi cacing hati.</p> <h2>Fasciolosis pada Sapi: Mengatasi Infeksi Cacing Hati yang Menyakitkan</h2> <h3>Penyebab dan Gejala</h3> <p>Fasciolosis adalah infeksi cacing hati yang disebabkan oleh Fasciola hepatica. Gejala termasuk penurunan berat badan, anemia, dan kerusakan hati yang dapat mengakibatkan kematian pada kasus yang parah.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan feses dan tes darah. Pengobatan melibatkan pemberian obat antelmintik dan pengelolaan lingkungan yang baik untuk mencegah infestasi ulang.</p> <h3>Pencegahan</h3> <p>Pencegahan fasciolosis melibatkan program deworming rutin dan pengelolaan lingkungan yang baik untuk mengurangi kontaminasi dengan cacing hati.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-20',
'judul' => 'Kaskado: Mengatasi Penyakit yang Mengancam Produktivitas Ternak',
'slug' => Str::slug('Kaskado: Mengatasi Penyakit yang Mengancam Produktivitas Ternak'),
'gambar' => 'gambar-testing-20.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Kaskado adalah istilah lokal untuk penyakit menular pada sapi yang dapat mengganggu produktivitas ternak, termasuk infeksi bakteri, virus, atau parasit. Gejala dan penyebab kaskado bervariasi, namun umumnya ditandai dengan penurunan nafsu makan, penurunan berat badan, dan demam.</p> <p>Penanganan kaskado memerlukan diagnosis yang tepat untuk mengidentifikasi penyebab spesifik dan pengobatan yang sesuai. Artikel ini akan membahas berbagai jenis kaskado, gejala umum yang harus diwaspadai, serta langkah-langkah pencegahan dan pengobatan yang dapat dilakukan untuk menjaga kesehatan dan produktivitas sapi.</p> <h2>Kaskado pada Sapi: Mencegah dan Mengatasi Penyakit Ini</h2> <h3>Apa itu Kaskado?</h3> <p>Kaskado adalah penyakit yang disebabkan oleh bakteri Clostridium perfringens, yang dapat menyebabkan gangren pada jaringan otot dan seringkali fatal. Penyakit ini ditandai dengan munculnya luka yang berbau busuk dan jaringan yang menghitam.</p> <h3>Gejala dan Penyebaran</h3> <p>Gejala kaskado termasuk demam tinggi, pembengkakan yang menyakitkan pada otot, dan keluarnya cairan dari luka. Penyebaran terjadi melalui luka terbuka yang terkontaminasi oleh bakteri.</p> <h3>Pencegahan dan Pengobatan</h3> <p>Pencegahan melibatkan manajemen kebersihan yang baik dan vaksinasi rutin. Pengobatan biasanya tidak efektif pada tahap lanjut, sehingga pencegahan sangat penting.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-21',
'judul' => 'Myasis pada Sapi: Infestasi Larva Lalat dan Cara Mengatasinya',
'slug' => Str::slug('Myasis pada Sapi: Infestasi Larva Lalat dan Cara Mengatasinya'),
'gambar' => 'gambar-testing-21.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Myasis adalah infestasi larva lalat pada jaringan hidup, yang dapat menyebabkan luka terbuka, infeksi, dan kerusakan jaringan pada sapi. Penyakit ini disebabkan oleh lalat botfly atau screwworm yang meletakkan telurnya di luka atau kulit sapi. Ketika telur menetas, larva akan menginfeksi jaringan, menyebabkan rasa sakit dan infeksi sekunder.</p> <p>Pengendalian myasis melibatkan perawatan luka yang baik, penggunaan insektisida, dan pengendalian populasi lalat di peternakan. Artikel ini akan membahas penyebab, gejala, dan langkah-langkah pencegahan serta pengobatan myasis pada sapi, untuk membantu peternak melindungi ternak mereka dari infestasi lalat yang menyakitkan.</p> <h2>Myasis pada Sapi: Mengatasi Infestasi Lalat yang Menyakitkan</h2> <h3>Penyebab dan Gejala</h3> <p>Myasis adalah infestasi larva lalat pada jaringan hidup, yang menyebabkan luka dan iritasi pada sapi. Gejala termasuk luka terbuka, keluarnya cairan, dan perilaku gelisah pada hewan.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan luka dan identifikasi larva. Pengobatan melibatkan pembersihan luka, pengangkatan larva, dan penggunaan insektisida topikal.</p> <h3>Pencegahan</h3> <p>Pencegahan myasis melibatkan manajemen kebersihan yang baik, kontrol lalat, dan pengelolaan luka secara cepat untuk mencegah infestasi larva.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-22',
'judul' => 'Scabies pada Sapi: Penanganan Efektif Kudis yang Menyiksa',
'slug' => Str::slug('Scabies pada Sapi: Penanganan Efektif Kudis yang Menyiksa'),
'gambar' => 'gambar-testing-22.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Scabies, atau kudis, adalah penyakit kulit yang disebabkan oleh infestasi tungau Sarcoptes scabiei. Penyakit ini ditandai dengan gatal hebat, keropeng, dan rambut rontok, yang bisa menyebabkan stres dan penurunan berat badan pada sapi. Scabies sangat menular dan dapat menyebar dengan cepat di antara hewan ternak.</p> <p>Penanganan scabies melibatkan penggunaan obat acaricide, kebersihan yang baik, dan pengelolaan stres pada ternak. Artikel ini akan mengulas gejala scabies, cara penyebarannya, serta langkah-langkah pencegahan dan pengobatan yang dapat diambil untuk mengendalikan kudis pada sapi dan menjaga kesehatan ternak.</p> <h2>Scabies pada Sapi: Mengatasi Penyakit Kulit yang Menyiksa</h2> <h3>Penyebab dan Gejala</h3> <p>Scabies adalah penyakit kulit yang disebabkan oleh tungau Sarcoptes scabiei. Gejala termasuk gatal parah, kemerahan, dan keropeng pada kulit.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan mikroskopis kulit. Pengobatan melibatkan penggunaan acaricide dan menjaga kebersihan lingkungan ternak.</p> <h3>Pencegahan</h3> <p>Pencegahan scabies melibatkan manajemen kebersihan yang baik dan isolasi hewan yang terinfeksi untuk mencegah penyebaran tungau.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-23',
'judul' => 'Surra (Penyakit Mubeng): Penyakit Mubeng yang Membahayakan Ternak',
'slug' => Str::slug('Surra (Penyakit Mubeng): Penyakit Mubeng yang Membahayakan Ternak'),
'gambar' => 'gambar-testing-23.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Surra adalah penyakit protozoa yang disebabkan oleh Trypanosoma evansi, yang ditularkan melalui gigitan lalat tsetse atau lalat tabanus. Penyakit ini ditandai dengan demam, anemia, pembengkakan kelenjar getah bening, dan dalam kasus yang parah, kematian. Surra dapat menyebabkan kerugian ekonomi yang signifikan di peternakan karena penurunan produktivitas dan kematian ternak.</p> <p>Pengendalian surra melibatkan penggunaan insektisida untuk mengendalikan populasi lalat, terapi dengan obat antiparasit, dan pengelolaan kesehatan ternak yang baik. Artikel ini akan membahas penyebab, gejala, dan langkah-langkah pencegahan serta pengobatan surra pada sapi, untuk membantu peternak melindungi ternak mereka dari penyakit yang berbahaya ini.</p> <h2>Surra pada Sapi: Mengatasi Penyakit Mubeng yang Mengancam</h2> <h3>Penyebab dan Gejala</h3> <p>Surra adalah penyakit protozoa yang disebabkan oleh Trypanosoma evansi, yang ditularkan oleh lalat penghisap darah. Gejala termasuk demam, anemia, dan pembengkakan kelenjar getah bening.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan darah dan identifikasi parasit. Pengobatan melibatkan pemberian obat antiprotozoa dan manajemen lingkungan untuk mengontrol populasi vektor.</p> <h3>Pencegahan</h3> <p>Pencegahan surra melibatkan kontrol vektor, manajemen kebersihan yang baik, dan pemberian obat profilaksis jika diperlukan.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-24',
'judul' => 'Distokia (Kesulitan Melahirkan): Mengatasi Kesulitan Melahirkan dengan Tepat',
'slug' => Str::slug('Distokia (Kesulitan Melahirkan): Mengatasi Kesulitan Melahirkan dengan Tepat'),
'gambar' => 'gambar-testing-24.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Distokia adalah kesulitan melahirkan pada sapi yang dapat disebabkan oleh berbagai faktor, termasuk posisi janin yang tidak normal, ukuran janin yang terlalu besar, atau kelemahan ibu sapi. Distokia memerlukan penanganan cepat dan tepat untuk mencegah komplikasi yang dapat membahayakan ibu dan anak sapi.</p> <p>Penanganan distokia melibatkan bantuan obstetrik yang tepat, manajemen kebuntingan yang baik, dan pemantauan kesehatan sapi selama masa kehamilan. Artikel ini akan membahas penyebab distokia, tanda-tanda yang perlu diwaspadai, serta langkah-langkah penanganan yang dapat diambil untuk mengatasi kesulitan melahirkan pada sapi dengan efektif.</p> <h2>Distokia pada Sapi: Mengatasi Kesulitan Melahirkan dengan Aman</h2> <h3>Penyebab dan Gejala</h3> <p>Distokia adalah kesulitan melahirkan yang bisa disebabkan oleh berbagai faktor seperti ukuran anak sapi yang besar, posisi janin yang salah, atau kelemahan pada induk sapi. Gejala termasuk kontraksi yang tidak efektif dan kesulitan mengeluarkan anak sapi.</p> <h3>Penanganan dan Pengobatan</h3> <p>Penanganan distokia melibatkan intervensi manual oleh tenaga medis veteriner atau melalui operasi caesar jika diperlukan. Pengobatan juga melibatkan perawatan suportif setelah melahirkan untuk memastikan kesehatan induk dan anak sapi.</p> <h3>Pencegahan</h3> <p>Pencegahan distokia melibatkan manajemen reproduksi yang baik, termasuk pemilihan pejantan yang tepat dan pemberian pakan yang seimbang untuk mendukung kesehatan induk sapi.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-25',
'judul' => 'Prolapsus Uteri (Uterus Keluar): Penanganan dan Pencegahan Uterus Keluar',
'slug' => Str::slug('Prolapsus Uteri (Uterus Keluar): Penanganan dan Pencegahan Uterus Keluar'),
'gambar' => 'gambar-testing-25.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Prolapsus uteri adalah kondisi di mana uterus sapi keluar melalui vagina, biasanya terjadi setelah proses melahirkan. Kondisi ini dapat menyebabkan infeksi, kerusakan jaringan, dan jika tidak ditangani segera, dapat mengancam nyawa sapi. Prolapsus uteri seringkali memerlukan intervensi medis untuk mengembalikan uterus ke posisi normal dan mencegah komplikasi lebih lanjut.</p> <p>Pencegahan prolapsus uteri melibatkan manajemen kebuntingan yang baik, nutrisi yang tepat, dan pemantauan kesehatan sapi setelah melahirkan. Artikel ini akan membahas penyebab prolapsus uteri, tanda-tanda yang perlu diwaspadai, serta langkah-langkah penanganan dan pencegahan yang dapat diambil untuk mengatasi kondisi ini pada sapi.</p> <h2>Prolapsus Uteri pada Sapi: Mengatasi Keluarnya Uterus dengan Cepat</h2> <h3>Penyebab dan Gejala</h3> <p>Prolapsus uteri adalah kondisi medis darurat di mana uterus sapi keluar dari tubuh setelah melahirkan. Gejala termasuk keluarnya jaringan uterus melalui vulva, yang dapat menyebabkan syok dan infeksi jika tidak segera ditangani.</p> <h3>Penanganan dan Pengobatan</h3> <p>Penanganan prolapsus uteri melibatkan intervensi cepat oleh tenaga medis veteriner untuk mengembalikan uterus ke posisi normal dan memberikan perawatan suportif seperti antibiotik dan cairan intravena.</p> <h3>Pencegahan</h3> <p>Pencegahan prolapsus uteri melibatkan manajemen kebersihan yang baik selama dan setelah melahirkan, serta pengawasan yang ketat terhadap sapi yang sedang dalam proses melahirkan.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-26',
'judul' => 'Prolaps Vagina (Vagina Keluar): Cara Mengatasi dan Mencegahnya',
'slug' => Str::slug('Prolaps Vagina (Vagina Keluar): Cara Mengatasi dan Mencegahnya'),
'gambar' => 'gambar-testing-26.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Prolaps vagina adalah kondisi di mana bagian dari vagina sapi keluar melalui vulva, yang bisa terjadi sebelum atau setelah melahirkan. Kondisi ini dapat menyebabkan infeksi, rasa sakit, dan kesulitan melahirkan jika tidak ditangani dengan cepat dan tepat. Prolaps vagina sering kali memerlukan intervensi medis untuk mengembalikan vagina ke posisi normal dan mencegah komplikasi lebih lanjut.</p> <p>Pencegahan prolaps vagina melibatkan manajemen kebuntingan yang baik, nutrisi yang tepat, dan pemantauan kesehatan sapi selama masa kehamilan. Artikel ini akan membahas penyebab prolaps vagina, gejala yang perlu diwaspadai, serta langkah-langkah penanganan dan pencegahan yang dapat diambil untuk mengatasi kondisi ini pada sapi.</p> <h2>Prolaps Vagina pada Sapi: Mengatasi Keluarnya Vagina dengan Efektif</h2> <h3>Penyebab dan Gejala</h3> <p>Prolaps vagina adalah kondisi di mana vagina sapi keluar sebagian atau seluruhnya dari tubuh, biasanya terjadi sebelum atau selama melahirkan. Gejala termasuk keluarnya jaringan vagina melalui vulva dan ketidaknyamanan pada hewan.</p> <h3>Penanganan dan Pengobatan</h3> <p>Penanganan prolaps vagina melibatkan intervensi cepat oleh tenaga medis veteriner untuk mengembalikan vagina ke posisi normal dan memberikan perawatan suportif seperti antibiotik untuk mencegah infeksi.</p> <h3>Pencegahan</h3> <p>Pencegahan prolaps vagina melibatkan manajemen kebersihan yang baik dan pengawasan yang ketat terhadap sapi yang sedang dalam proses melahirkan, serta pemilihan pejantan yang tepat untuk mengurangi risiko.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-27',
'judul' => 'Repcal Breeder (Birahi Berulang): Solusi Mengatasi Masalah Birahi Berulang pada Sapi',
'slug' => Str::slug('Repcal Breeder (Birahi Berulang): Solusi Mengatasi Masalah Birahi Berulang pada Sapi'),
'gambar' => 'gambar-testing-27.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Repcal breeder atau birahi berulang adalah kondisi di mana sapi betina tidak hamil meskipun telah kawin beberapa kali. Masalah ini dapat disebabkan oleh berbagai faktor, termasuk gangguan hormonal, infeksi, atau masalah nutrisi. Birahi berulang dapat mengakibatkan penurunan efisiensi reproduksi dan kerugian ekonomi di peternakan.</p> <p>Penanganan repcal breeder melibatkan diagnosis yang tepat untuk mengidentifikasi penyebab spesifik dan penerapan manajemen reproduksi yang baik. Artikel ini akan membahas berbagai penyebab birahi berulang pada sapi, serta solusi dan strategi yang dapat diambil untuk meningkatkan keberhasilan reproduksi di peternakan.</p> <h2>Repcal Breeder: Mengatasi Birahi Berulang pada Sapi dengan Tepat</h2> <h3>Penyebab dan Gejala</h3> <p>Repcal breeder adalah kondisi di mana sapi betina mengalami birahi berulang tanpa terjadinya pembuahan. Gejala termasuk siklus estrus yang tidak teratur dan ketidakmampuan untuk hamil.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan fisik dan tes hormon. Pengobatan melibatkan pemberian terapi hormon dan manajemen reproduksi yang baik untuk mengatur siklus estrus.</p> <h3>Pencegahan</h3> <p>Pencegahan repcal breeder melibatkan manajemen nutrisi dan kesehatan yang baik untuk mendukung fungsi reproduksi yang optimal pada sapi betina.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-28',
'judul' => 'Caplak pada Sapi: Pencegahan dan Penanganan Parasit yang Menyebalkan',
'slug' => Str::slug('Caplak pada Sapi: Pencegahan dan Penanganan Parasit yang Menyebalkan'),
'gambar' => 'gambar-testing-28.jpg',
'penulis' => 'Administrator',
'artikel' => '<p>Caplak adalah parasit eksternal yang menyerang sapi, menghisap darah, dan dapat menyebabkan iritasi kulit, anemia, serta menularkan berbagai penyakit. Infestasi caplak dapat menurunkan kesehatan dan produktivitas sapi, serta menyebabkan kerugian ekonomi di peternakan.</p> <p>Pengendalian caplak melibatkan penggunaan acaricide, pengelolaan lingkungan peternakan yang baik, dan pemantauan rutin untuk mendeteksi dan mengendalikan infestasi. Artikel ini akan membahas penyebab infestasi caplak, gejala yang perlu diwaspadai, serta langkah-langkah pencegahan dan penanganan yang dapat diambil untuk melindungi sapi dari parasit yang menyebalkan ini.</p> <h2>Caplak pada Sapi: Mengatasi Infestasi Parasit yang Mengganggu</h2> <h3>Penyebab dan Gejala</h3> <p>Caplak adalah parasit eksternal yang menempel pada kulit sapi dan menghisap darah. Gejala termasuk gatal, iritasi kulit, anemia, dan penurunan produksi susu.</p> <h3>Diagnosis dan Pengobatan</h3> <p>Diagnosis dilakukan melalui pemeriksaan fisik untuk mengidentifikasi caplak. Pengobatan melibatkan penggunaan insektisida topikal dan manajemen kebersihan yang baik untuk mengurangi infestasi.</p> <h3>Pencegahan</h3> <p>Pencegahan caplak melibatkan manajemen lingkungan yang baik untuk mengurangi populasi caplak, serta penggunaan insektisida secara rutin untuk melindungi sapi dari infestasi.</p>',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
]);
}
}

View File

@ -0,0 +1,246 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class PenyakitSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('penyakits')->insert([
[
'penyakitId' => 'PKID-01',
'penyakit' => 'Bovine Ephemeral Fever (BEF)',
'deskripsi' => 'Bovine Ephemeral Fever (BEF) merupakan penyakit sapi yang bersifat akut yang disertai demam, dengan angka kesakitan (morbiditas) yang tinggi, akan tetapi angka kematiannya (mortalitas) rendah.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-02',
'penyakit' => 'Diare Ganas',
'deskripsi' => 'Bovine Viral Diarhea (BVD) atau Diare Ganas Pada Sapi (DGS) merupakan penyakit menular yang disebabkan oleh virus BVDV.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-03',
'penyakit' => 'ORF',
'deskripsi' => 'Penyakit orf merupakan penyakit viral (yang disebabkan oleh virus) utama yang menyerang ternak kambing dan dapat menular ke manusia (bersifat zoonosis).',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-04',
'penyakit' => 'Malignant Catarrhal Fever (Penyakit Ingusan)',
'deskripsi' => 'Penyakit ingusan atau Malignant catarrhal fever (MCF) adalah penyakit yang bersifat fatal pada sapi bali yang disebabkan oleh virus Ovine Herpesvirus-2 (OvHV-2) yang dibawa oleh hewan reservoir domba (sheep-associated).',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'penyakit' => 'Penyakit Mulut dan Kuku (PMK)',
'deskripsi' => 'Penyakit Mulut dan Kuku (PMK) merupakan penyakit viral yang sangat menular dan menyerang semua hewan berkuku belah/genap, seperti Sapi, Kerbau, Babi, Kambing, Domba, Gajah, Rusa, dan lain sebagainya.',
'solusi' => 'Vaksinasi PMK, Pengobatan medis, Perawatan luka, Kebersihan kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-06',
'penyakit' => 'Lumpy Skin Disease (LSD)',
'deskripsi' => 'Lumpy Skin Disease (LSD) merupakan penyakit yang disebabkan oleh virus yang utamanya menyerang hewan sapi. Penyakit ini dicirikan dengan adanya benjolan pada kulit sapi.',
'solusi' => 'Melakukan penyemprotan kendang anti serangga, Vaksinasi LSD, Kebersihan kendang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-07',
'penyakit' => 'Anthraks (Radang Limpa)',
'deskripsi' => 'Anthraks (Radang Limpa) merupakan penyakit menular yang dapat menyebabkan kematian mendadak atau tiba-tiba dan dapat menyerang pada berbagai jenis penyakit seperti Sapi, Kerbau, Kuda, Kambinng, Domba yang diserta dengan demam atau panas badan yang tinggi pada manusia (zoonosis).',
'solusi' => 'Vaksin Anthraks, Pemberian antibiotic, Pengobatan medis, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-08',
'penyakit' => 'Brucellosis (Keguguran)',
'deskripsi' => 'Brucellosis merupakan penyakit yang menyebabkan keguguran di sapi dan bisa menular ke manusia. Penyakit brucella abortus dapat disebarkan melalui konsumsi produk peternakan yang sudah terkontaminasi seperti air susu. ',
'solusi' => 'Pengobatan medis, Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-09',
'penyakit' => 'Colibacillosis',
'deskripsi' => 'Colibacillosis septikemia adalah penyebab utama kematian dini anak sapi. Kondisi ini seringkali berakibat fatal atau menyebabkan infeksi pasca septikemia yang seringkali tidak responsif terhadap pengobatan.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-10',
'penyakit' => 'Mastitis (Radang Ambing)',
'deskripsi' => 'Mastitis atau radang ambing merupakan penyakit pada ambing bagian dalam yang disebabkan oleh infeksi bakteri atau kuman. Bakteri atau kuman utama yang menyebabkan penyakit mastitis yaitu Staphylococcus cocci dan Streptococcus cocci.',
'solusi' => 'Pengobatan medis, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-11',
'penyakit' => 'Pink Eye (Radang Mata)',
'deskripsi' => 'Pink eye pada sapi biasanya disebabkan oleh bakteri moraxella bovis yang merusak kornea mata sapi. Keberadaan debu, lalat, virus, atau benda asing yang mengiritasi mata, akan menjadikan bakteri ini mudah menyerang mata.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-12',
'penyakit' => 'Salmonellosis',
'deskripsi' => 'Salmonellosis adalah infeksi saluran pencernaan yang disebabkan oleh bakteri Salmonella enterica. Salmonella enterica memiliki lebih dari 2.000 strain. Untungnya sapi biasanya terinfeksi secara klinis oleh kurang dari 10 ekor sapi.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-13',
'penyakit' => 'Septicemia Epizootica (Penyakit Ngorok)',
'deskripsi' => 'Penyakit Septicemia epizootica (SE) atau ngorok adalah suatu penyakit infeksi akut atau menahun pada sapi dan kerbau yang terjadi secara septikemik. Penyakit ini terjadi juga pada jenis ternak yang lain seperti pada onta, kambing, domba, dan kuda.',
'solusi' => 'Penyuntikan Vaksin Septivet, Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-14',
'penyakit' => 'Tetanus',
'deskripsi' => 'Tetanus disebabkan oleh racun yang dihasilkan oleh bakteri Clostridium tetani. Bakteri ini ditemukan di tanah dan usus hewan dan manusia. Penyakit ini dimulai ketika organisme memasuki jaringan yang terluka atau rusak akibat kontaminasi. Dengan tidak adanya oksigen, bakteri berkembang biak dan menghasilkan infeksi lokal.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-15',
'penyakit' => 'Tuberkulosis Sapi (TBC Sapi)',
'deskripsi' => 'Tuberkulosis (TBC) sapi merupakan penyakit menular yang disebabkan oleh bakteri Mycobacterium bovis. TBC sapi terutama menyerang sapi, namun hewan lain juga bisa tertular.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-16',
'penyakit' => 'Ringworm',
'deskripsi' => 'Ringworm atau dermatophytosis merupakan penyakit akibat infeksi cendawan atau jamur pada kulit atau jaringan lain yang mengandung keratin seperti bulu, kuku, rambut dan tanduk pada hewan maupun manusia.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-17',
'penyakit' => 'Ascariasis (Cacingan)',
'deskripsi' => 'Ascariasis adalah suatu infeksi yang dipicu oleh Ascaris lumbricoides atau cacing gelang. Jenis cacing ini dapat masuk ke dalam tubuh lalu hidup dan berkembang biak di dalam usus. Bahkan tak hanya menyerang usus, Ascaris lumbricoides juga dapat menginfeksi organ paru-paru.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-18',
'penyakit' => 'Demodecosis (Kudis Menular)',
'deskripsi' => 'Penyakit kudis menular atau skabies adalah penyakit ektoparasit utama yang menyerang bagian kulit hewan ternak ruminansia (kambing, domba, sapi dll). Skabies terutama menyerang kambing dan kelinci, serta dapat menular ke manusia (bersifat zoonosis). Penyakit kudis menular atau skabies ini sangat populer di kalangan peternak hingga mempunyai banyak nama lain, yaitu; budug, kurap, dan mange.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-19',
'penyakit' => 'Fasciolosis (Penyakit Cacing Hati)',
'deskripsi' => 'Fascioliasis merupakan penyakit cacing hati yang disebabkan oleh Fasciola sp. yang dapat menyerang sapi, kerbau, kambing, domba. Ternak dapat terinfeksi melalui pakan, terutama rumput yang tercemar larva cacing, masuk ke saluran pencernaan sapi dan cacing dewasa bermigrasi ke hati.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-20',
'penyakit' => 'Kaskado',
'deskripsi' => 'Kaskado merupakan salah satu infeksi kulit yang disebabkan oleh jamur Trichophyton Concentricum. Kaskado pada sapi yang sering dijumpai di lapangan ditandai dengan adanya luka di sekitar mata, sapi nampak gelisah, tidak tenang karena rasa gatal yang ditimbulkan, dan terlihat banyak lalat hinggap di daerah sekitar lesi.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-21',
'penyakit' => 'Myiasis',
'deskripsi' => 'Myiasis adalah suatu akibat dari ipfestasi parasit ekstemal yang mampu . menimbulkan efek pengrusakan pada jaringan tubuh manusia maupun hewan. Larva laIat ordo Diptera diantaranya Calliphora sp, Phomia sp, Chrysomyia sp, merupakan penyebab utama timbulnya myiasis.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-22',
'penyakit' => 'Scabies',
'deskripsi' => 'Penyakit Scabies sering juga disebut penyakit kudis atau bulug atau budug pada sapi/ternak. Scabies biasanya disebabkan oleh lalat dan kandang yang kotor. Kotoran tersebut biasanya mengandung tungau sarcoptes scabei.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-23',
'penyakit' => 'Surra (Penyakit Mubeng)',
'deskripsi' => 'Penyakit Trypanosomiasis atau Surra atau penyakit mubeng merupakan penyakit parasiter pada mamalia terutama kuda. Hewan lain yang rentan yaitu sapi, kerbau, kambing, domba dan rusa, namun hewan-hewan tersebut lebih toleran terhadap infeksi sehingga dapat menjadi hewan pembawa parasit (reservoir).',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-24',
'penyakit' => 'Distokia (Kesulitan Melahirkan)',
'deskripsi' => 'Distokia merupakan suatu keadaan dimana induk hewan mengalami kesulitan dalam proses melahirkan. Penyebab dari distokia ini adalah masalah yang terjadi dari induk maupun dari anak. Masalah dari induk mengalami kegagalan dalam merejan dan adanya sumbatan dari saluran peranakan. Sedangkan masalah dari fetus biasanya dikarenakan kekurangan hormone, ukuran fetus terlalu besar, posisi fetus yang salah, atau kematian fetus.',
'solusi' => 'Operasi Caesar, Pengobatan medis, Evaluasi cepat, Perawatan Pascakelahiran',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-25',
'penyakit' => 'Prolapsus Uteri (Penonjolan Uterus)',
'deskripsi' => 'Prolapsus uteri adalah mukosa uterus keluar dari badan melalui vagina secara total ada pula yang sebagian. Pada umumnya terjadi pada sapi yang berumur lebih 4 tahun. Prolapsus atau pembalikan uterus sering terjadi segera sesudah partus dan jarang terjadi beberapa jam sesudah itu.',
'solusi' => 'Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-26',
'penyakit' => 'Prolaps Vagina (Vagina Keluar)',
'deskripsi' => 'Prolaps vagina adalah berbagai tonjolan pada dinding vagina dan cervix melalui vulva sehingga mukosa vagina terekspose. Masalah yang sering ditemukan pada sapi dan domba. Umumnya terjadi pada pada trimester terakhir kebuntingan.',
'solusi' => 'Perlu penanganan yang cepat dan tepat, Pengobatan medis, Pemberian pakan yang baik, Kebersihan Kandang, Pisahkan sapi yang sakit',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-27',
'penyakit' => 'Repcal Breeder (Birahi Berulang)',
'deskripsi' => 'Penyebab umum birahi sapi semakin panjang ialah kualitas pakan yang diberikan rendah. Kualitas pakan yang rendah memang berpengaruh terhadap reproduksi sapi yang berujung pada masa birahi semakin panjang. Oleh karenanya, penting bagi peternak memberikan pakan yang berkualitas tinggi setiap harinya.',
'solusi' => 'null',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-28',
'penyakit' => 'Caplak',
'deskripsi' => 'Caplak merupakan vektor dari protozoa parasit pada darah yang dapat masuk dan merusak sel darah merah. Parasit darah pada sapi ini yang meliputi Babesia sp., Theilleria sp., Anaplasma sp., dan lain-lain, dapat memperparah kejadian anemia pada ternak yang mengalami infeksi caplak.',
'solusi' => 'Pengobatan medis, Memantau Kesehatan selama 3 hari 24 jam',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
]);
}
}

View File

@ -0,0 +1,694 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class RuleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('rules')->insert([
[
'penyakitId' => 'PKID-01',
'gejalaId' => 'GJID-001',
'nilaiPakar' => '0.85',
'belief' => '0.417',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-01',
'gejalaId' => 'GJID-002',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-01',
'gejalaId' => 'GJID-003',
'nilaiPakar' => '0.05',
'belief' => '0.275',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-01',
'gejalaId' => 'GJID-004',
'nilaiPakar' => '0.85',
'belief' => '0.675',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-01',
'gejalaId' => 'GJID-005',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-01',
'gejalaId' => 'GJID-006',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-02',
'gejalaId' => 'GJID-007',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-02',
'gejalaId' => 'GJID-008',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-02',
'gejalaId' => 'GJID-009',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-02',
'gejalaId' => 'GJID-010',
'nilaiPakar' => '0.05',
'belief' => '0.05',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-03',
'gejalaId' => 'GJID-011',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-03',
'gejalaId' => 'GJID-012',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-04',
'gejalaId' => 'GJID-013',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-04',
'gejalaId' => 'GJID-014',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-04',
'gejalaId' => 'GJID-015',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'gejalaId' => 'GJID-016',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'gejalaId' => 'GJID-017',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'gejalaId' => 'GJID-006',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'gejalaId' => 'GJID-018',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'gejalaId' => 'GJID-004',
'nilaiPakar' => '0.5',
'belief' => '0.675',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-05',
'gejalaId' => 'GJID-001',
'nilaiPakar' => '0.05',
'belief' => '0.417',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-06',
'gejalaId' => 'GJID-019',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-06',
'gejalaId' => 'GJID-020',
'nilaiPakar' => '0.5',
'belief' => '0.375',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-06',
'gejalaId' => 'GJID-001',
'nilaiPakar' => '0.85',
'belief' => '0.417',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-06',
'gejalaId' => 'GJID-021',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-07',
'gejalaId' => 'GJID-022',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-07',
'gejalaId' => 'GJID-023',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-08',
'gejalaId' => 'GJID-024',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-08',
'gejalaId' => 'GJID-025',
'nilaiPakar' => '0.5',
'belief' => '0.75',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-09',
'gejalaId' => 'GJID-026',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-09',
'gejalaId' => 'GJID-027',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-10',
'gejalaId' => 'GJID-025',
'nilaiPakar' => '1',
'belief' => '0.75',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-10',
'gejalaId' => 'GJID-028',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-11',
'gejalaId' => 'GJID-029',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-11',
'gejalaId' => 'GJID-003',
'nilaiPakar' => '0.5',
'belief' => '0.275',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-11',
'gejalaId' => 'GJID-030',
'nilaiPakar' => '0.85',
'belief' => '0.675',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-12',
'gejalaId' => 'GJID-031',
'nilaiPakar' => '1',
'belief' => '0.667',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-12',
'gejalaId' => 'GJID-001',
'nilaiPakar' => '0.25',
'belief' => '0.417',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-13',
'gejalaId' => 'GJID-001',
'nilaiPakar' => '0.25',
'belief' => '0.417',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-13',
'gejalaId' => 'GJID-032',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-13',
'gejalaId' => 'GJID-033',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-14',
'gejalaId' => 'GJID-034',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-14',
'gejalaId' => 'GJID-035',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-14',
'gejalaId' => 'GJID-036',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-15',
'gejalaId' => 'GJID-037',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-15',
'gejalaId' => 'GJID-038',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-15',
'gejalaId' => 'GJID-039',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-16',
'gejalaId' => 'GJID-040',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-16',
'gejalaId' => 'GJID-041',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-16',
'gejalaId' => 'GJID-042',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-17',
'gejalaId' => 'GJID-031',
'nilaiPakar' => '0.5',
'belief' => '0.667',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-17',
'gejalaId' => 'GJID-043',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-17',
'gejalaId' => 'GJID-044',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-18',
'gejalaId' => 'GJID-045',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-18',
'gejalaId' => 'GJID-042',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-19',
'gejalaId' => 'GJID-043',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-19',
'gejalaId' => 'GJID-031',
'nilaiPakar' => '0.5',
'belief' => '0.667',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-19',
'gejalaId' => 'GJID-046',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-20',
'gejalaId' => 'GJID-047',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-20',
'gejalaId' => 'GJID-048',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-21',
'gejalaId' => 'GJID-049',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-22',
'gejalaId' => 'GJID-040',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-22',
'gejalaId' => 'GJID-042',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-23',
'gejalaId' => 'GJID-050',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-23',
'gejalaId' => 'GJID-051',
'nilaiPakar' => '0.05',
'belief' => '0.05',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-23',
'gejalaId' => 'GJID-030',
'nilaiPakar' => '0.5',
'belief' => '0.675',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-23',
'gejalaId' => 'GJID-052',
'nilaiPakar' => '0.85',
'belief' => '0.85',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-24',
'gejalaId' => 'GJID-053',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-24',
'gejalaId' => 'GJID-054',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-24',
'gejalaId' => 'GJID-055',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-24',
'gejalaId' => 'GJID-056',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-25',
'gejalaId' => 'GJID-057',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-25',
'gejalaId' => 'GJID-054',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-25',
'gejalaId' => 'GJID-058',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-25',
'gejalaId' => 'GJID-059',
'nilaiPakar' => '0.05',
'belief' => '0.05',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-26',
'gejalaId' => 'GJID-060',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-26',
'gejalaId' => 'GJID-001',
'nilaiPakar' => '0.25',
'belief' => '0.417',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-27',
'gejalaId' => 'GJID-061',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-27',
'gejalaId' => 'GJID-062',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-27',
'gejalaId' => 'GJID-063',
'nilaiPakar' => '0.5',
'belief' => '0.5',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-28',
'gejalaId' => 'GJID-064',
'nilaiPakar' => '1',
'belief' => '1',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-28',
'gejalaId' => 'GJID-020',
'nilaiPakar' => '0.25',
'belief' => '0.375',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-28',
'gejalaId' => 'GJID-065',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'penyakitId' => 'PKID-28',
'gejalaId' => 'GJID-066',
'nilaiPakar' => '0.25',
'belief' => '0.25',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
]);
}
}

View File

@ -0,0 +1,41 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
[
'name' => 'Administrator',
'email' => 'administrator@gmail.com',
'nope' => '089222999383',
'password' => Hash::make('loginadmin'),
'role' => 'administrator',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
],
[
'name' => 'Peternak',
'email' => 'peternak@gmail.com',
'nope' => '089222999383',
'password' => Hash::make('loginpeternak'),
'role' => 'peternak',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
]
]);
}
}

20
lang/en/auth.php Normal file
View File

@ -0,0 +1,20 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'password' => 'The provided password is incorrect.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

19
lang/en/pagination.php Normal file
View File

@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];

22
lang/en/passwords.php Normal file
View File

@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'reset' => 'Your password has been reset!',
'sent' => 'We have emailed your password reset link!',
'throttled' => 'Please wait before retrying.',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that email address.",
];

184
lang/en/validation.php Normal file
View File

@ -0,0 +1,184 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute must only contain letters.',
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [
'array' => 'The :attribute must have between :min and :max items.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'numeric' => 'The :attribute must be between :min and :max.',
'string' => 'The :attribute must be between :min and :max characters.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'current_password' => 'The password is incorrect.',
'date' => 'The :attribute is not a valid date.',
'date_equals' => 'The :attribute must be a date equal to :date.',
'date_format' => 'The :attribute does not match the format :format.',
'decimal' => 'The :attribute must have :decimal decimal places.',
'declined' => 'The :attribute must be declined.',
'declined_if' => 'The :attribute must be declined when :other is :value.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field must have a value.',
'gt' => [
'array' => 'The :attribute must have more than :value items.',
'file' => 'The :attribute must be greater than :value kilobytes.',
'numeric' => 'The :attribute must be greater than :value.',
'string' => 'The :attribute must be greater than :value characters.',
],
'gte' => [
'array' => 'The :attribute must have :value items or more.',
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
'numeric' => 'The :attribute must be greater than or equal to :value.',
'string' => 'The :attribute must be greater than or equal to :value characters.',
],
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
'lowercase' => 'The :attribute must be lowercase.',
'lt' => [
'array' => 'The :attribute must have less than :value items.',
'file' => 'The :attribute must be less than :value kilobytes.',
'numeric' => 'The :attribute must be less than :value.',
'string' => 'The :attribute must be less than :value characters.',
],
'lte' => [
'array' => 'The :attribute must not have more than :value items.',
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
'numeric' => 'The :attribute must be less than or equal to :value.',
'string' => 'The :attribute must be less than or equal to :value characters.',
],
'mac_address' => 'The :attribute must be a valid MAC address.',
'max' => [
'array' => 'The :attribute must not have more than :max items.',
'file' => 'The :attribute must not be greater than :max kilobytes.',
'numeric' => 'The :attribute must not be greater than :max.',
'string' => 'The :attribute must not be greater than :max characters.',
],
'max_digits' => 'The :attribute must not have more than :max digits.',
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'array' => 'The :attribute must have at least :min items.',
'file' => 'The :attribute must be at least :min kilobytes.',
'numeric' => 'The :attribute must be at least :min.',
'string' => 'The :attribute must be at least :min characters.',
],
'min_digits' => 'The :attribute must have at least :min digits.',
'missing' => 'The :attribute field must be missing.',
'missing_if' => 'The :attribute field must be missing when :other is :value.',
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
'missing_with' => 'The :attribute field must be missing when :values is present.',
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'password' => [
'letters' => 'The :attribute must contain at least one letter.',
'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.',
'numbers' => 'The :attribute must contain at least one number.',
'symbols' => 'The :attribute must contain at least one symbol.',
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
],
'present' => 'The :attribute field must be present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'array' => 'The :attribute must contain :size items.',
'file' => 'The :attribute must be :size kilobytes.',
'numeric' => 'The :attribute must be :size.',
'string' => 'The :attribute must be :size characters.',
],
'starts_with' => 'The :attribute must start with one of the following: :values.',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid timezone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'uppercase' => 'The :attribute must be uppercase.',
'url' => 'The :attribute must be a valid URL.',
'ulid' => 'The :attribute must be a valid ULID.',
'uuid' => 'The :attribute must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [],
];

Some files were not shown because too many files have changed in this diff Show More