Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
tbfguestbe.tbf.ro
/
app
/
Http
/
Requests
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
SaleProcessFormRequest.php
| Size :
3.10
KB
Copy
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class SaleProcessFormRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string> */ public function rules(): array { $rules = []; if ($this->route('table') === 'email') { $rules = [ 'message' => 'required|string', 'subject' => 'required|string', 'sender' => 'required|string', 'send_date' => 'required|string', ]; } elseif ($this->route('table') === 'phone') { $rules = [ 'script' => 'required|string', 'responsible' => 'required|string', 'recipient' => 'required|string', ]; } elseif ($this->route('table') === 'text') { $rules = [ 'message' => 'required|string', 'sender' => 'required|string', 'send_date' => 'required|string', ]; } elseif ($this->route('table') === 'ad') { $rules = [ 'headline' => 'required|string', 'description' => 'required|string', 'image_description' => 'nullable|string', ]; } elseif ($this->route('table') === 'page') { $rules = [ 'main_link' => 'nullable|string', 'terms_link' => 'nullable|string', 'gdpr_link' => 'nullable|string', 'color' => 'nullable|string', 'logo' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'id_form' => 'nullable|string', 'headline' => 'nullable|string', 'subheadline' => 'nullable|string', 'main_cta' => 'nullable|string', 'secondary_cta' => 'nullable|string', 'image' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', ]; } elseif ($this->route('table') === 'page-element') { $rules = [ 'active' => 'nullable|boolean', 'headline' => 'nullable|string', 'subheadline' => 'nullable|string', 'image' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', 'main_cta' => 'nullable|string', 'secondary_cta' => 'nullable|string', 'description' => 'nullable|string', 'name' => 'nullable|string', 'position' => 'nullable|string', 'items' => 'nullable|array', // 'items.*.image' => 'nullable|image|mimes:jpeg,png,jpg,gif,svg|max:2048', ]; } elseif ($this->route('table') === 'resource') { $rules = [ 'headline' => 'required|string', 'items' => 'nullable|array', ]; } return $rules; } }
Back