One Hat Cyber Team
Your IP :
18.220.140.173
Server IP :
104.21.96.1
Server :
Linux agrigation-prod 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64
Server Software :
nginx/1.24.0
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
forge
/
gftag.com
/
app
/
Http
/
Requests
/
View File Name :
PaymentRequest.php
<?php namespace App\Http\Requests; use App\Models\State; use Illuminate\Foundation\Http\FormRequest; class PaymentRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $data = $this->payment_method == 'Stripe' ? 'required' : ''; $state = State::whereStatus(1)->count() > 0 ? 'required' : ''; return [ 'state_id' => auth()->check() && auth()->user()->state_id ? '' : $state, 'card' => $data, 'cvc' => $data, 'month' => $data, 'year' => $data ]; } /** * Get the error messages for the defined validation rules. * * @return array */ public function messages() { return [ 'state_id.required' => __('Please select your shipping state.'), 'card.required' => __('Card field is required.'), 'cvc.required' => __('Cvc field is required.'), 'month.required' => __('Month field is required.'), 'year.required' => __('Year field is required.') ]; } }