@@ -77,6 +77,7 @@ You can donate any amount of your choice by [clicking here](https://www.paypal.c
7777 - [Get parameter object](#get-parameter-object)
7878 - [Managing files](#managing-files)
7979 - [Get all parameters](#get-all-parameters)
80+ - [Check if parameters exists](#check-if-parameters-exists)
8081- [ Events] ( #events )
8182 - [ Available events] ( #available-events )
8283 - [ Registering new event] ( #registering-new-event )
@@ -1236,8 +1237,11 @@ $values = input()->all([
12361237All object implements the ` IInputItem ` interface and will always contain these methods:
12371238
12381239- ` getIndex() ` - returns the index/key of the input.
1240+ - ` setIndex() ` - set the index/key of the input.
12391241- ` getName() ` - returns a human friendly name for the input (company_name will be Company Name etc).
1242+ - ` setName() ` - sets a human friendly name for the input (company_name will be Company Name etc).
12401243- ` getValue() ` - returns the value of the input.
1244+ - ` setValue() ` - sets the value of the input.
12411245
12421246` InputFile ` has the same methods as above along with some other file-specific methods like:
12431247
@@ -1253,6 +1257,24 @@ All object implements the `IInputItem` interface and will always contain these m
12531257
12541258---
12551259
1260+ ### Check if parameters exists
1261+
1262+ You can easily if multiple items exists by using the ` exists ` method. It's simular to ` value ` as it can be used
1263+ to filter on request-methods and supports both ` string ` and ` array ` as parameter value.
1264+
1265+ ** Example:**
1266+
1267+ ``` php
1268+ if(input()->exists(['name', 'lastname'])) {
1269+ // Do stuff
1270+ }
1271+
1272+ /* Similar to code above */
1273+ if(input()->exists('name') && input()->exists('lastname')) {
1274+ // Do stuff
1275+ }
1276+ ```
1277+
12561278# Events
12571279
12581280This section will help you understand how to register your own callbacks to events in the router.
0 commit comments