Revision 151 | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?phpnamespace App\Http\Requests;use Illuminate\Foundation\Http\FormRequest;class UpdateSupplierRequest extends FormRequest{/*** Determine if the user is authorized to make this request.** @return bool*/public function authorize(): bool{if ( isset( $GLOBALS["user_rechte"]["bestellwesen"]["lieferanten"] ) ){return true;}return false;}/*** Get the validation rules that apply to the request.** @return array<string, mixed>*/public function rules(): array{return [//"name" => "required","name2" => "sometimes","rank" => "sometimes|integer","contact" => "sometimes","street" => "sometimes","houseno" => "sometimes","zip" => "sometimes","city" => "sometimes","phone" => "sometimes","fax" => "sometimes","email" => "sometimes|email","customer_no" => "sometimes","shipping_hint" => "sometimes","payment_hint" => "sometimes","common" => "sometimes","script" => "sometimes","stock_script" => "sometimes","interval" => "sometimes","accounts_payable" => "sometimes","ledger_account" => "sometimes",];}protected function passedValidation(): void{foreach ( $this as $key => $val ){if ( is_null( $val ) ){if ( $key == "country_id" ){continue;}$this->$key = "";}}}}