efbe
16cbaa7b07
All checks were successful
Run Action to Production / run pull to sync on target message (push) Has been skipped
46 lines
1.5 KiB
PHP
46 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\PengajuanPemutihan;
|
|
use App\Models\User;
|
|
use Illuminate\Http\Request;
|
|
|
|
class LayananPemutihanController extends Controller
|
|
{
|
|
|
|
public function index(){
|
|
$data = PengajuanPemutihan::get();
|
|
return view('layanan-pemutihan.index',['title' => 'Pengajuan Pemutihan | Admin Dashboard','data' => $data]);
|
|
}
|
|
|
|
public function tambah(){
|
|
$dosen = User::role('Dosen')->get();
|
|
return view('layanan-pemutihan.tambah',['title' => 'Pengajuan Pemutihan','dosen' => $dosen]);
|
|
}
|
|
|
|
public function store(Request $request){
|
|
$request->validate([
|
|
'mata_kuliah'=>'required',
|
|
'ruang_kelas'=>'required',
|
|
'jurnal_kuliah'=>'required',
|
|
'dosen_pengampu'=>'required|numeric',
|
|
'program_studi'=>'required',
|
|
'tanggal_kelas'=>'required|date',
|
|
'jam_kelas'=>'required|date_format:H:i',
|
|
'alasan'=>'required',
|
|
'bukti_pemutihan'=>'required|mimes:pdf,jpg|max:4096',
|
|
|
|
],[
|
|
'dosen.numeric' => 'Dosen tidak valid, cek kembali Dosen yang dipilih',
|
|
'tanggal_kelas.date' => 'Tanggal Tidak Valid, Cek kembali tanggal perkuliahan yang anda masukkan',
|
|
'jam_kelas.date_format' => 'Jam tidak valid, cek kembali jam perkuliahan yang anda masukkan',
|
|
'bukti_pemutihan.mimes' => 'Format File tidak berupa file JPG / PDF, cek kembali file anda',
|
|
'bukti_pemutihan.max' => 'Ukuran File Anda lebih dari 4Mb, Cek Ulang File anda',
|
|
]);
|
|
|
|
|
|
dd($request->all());
|
|
}
|
|
}
|