changed bukti 2 & 3 to accept all file

This commit is contained in:
Jagad R R
2025-01-02 15:19:43 +07:00
parent 1510a9dbcb
commit ff004299c1
6 changed files with 68 additions and 20 deletions
@@ -20,6 +20,7 @@ use App\Mail\ExpenseRejected;
use App\Mail\FinalApprove;
use App\Helpers\WhatsappHelper;
use App\Helpers\AuditTrailHelper;
use App\Rules\FileType;
class FormEntertainmentPresentationController extends Controller
{
@@ -84,8 +85,8 @@ class FormEntertainmentPresentationController extends Controller
'alamat' => 'required',
'nik_or_npwp' => 'required',
'bukti1' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,heic,heif|max:51200',
'bukti2' => 'nullable|file|mimes:xlsx,xls,csv',
'bukti3' => 'nullable|file|mimes:pdf',
'bukti2' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti3' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
]);
$cabang = UserHasCabang::with('cabang')->where('user_id', auth()->user()->id)->first()->cabang;
@@ -189,8 +190,8 @@ class FormEntertainmentPresentationController extends Controller
'alamat' => 'required',
'nik_or_npwp' => 'required',
'bukti1' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg,heic,heif|max:51200',
'bukti2' => 'nullable|file|mimes:xlsx,xls,csv',
'bukti3' => 'nullable|file|mimes:pdf',
'bukti2' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
'bukti3' => ['nullable', 'file', new FileType(['php', 'exe', 'js', 'sh', 'bat', 'exe', 'sh', 'php', 'vbs'])],
]);
$form = FormEntertaimentPresentation::findOrfail($id);