You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,4 +35,32 @@ To install XssInput as a Composer package to be used with Laravel 4, simply add
35
35
36
36
You could also, instead of doing this, give the XssInput facade a separate alias.
37
37
38
-
Then publish the config file with `php artisan config:publish frozennode/xssinput`. This will add the file `app/config/packages/frozennode/xssinput/xssinput.php`, which you should look at and understand because it's one option long.
38
+
Then publish the config file with `php artisan config:publish frozennode/xssinput`. This will add the file `app/config/packages/frozennode/xssinput/xssinput.php`, which you should look at and understand because it's one option long.
39
+
40
+
## Usage
41
+
42
+
It really is screamingly simple. If you've set the global xss filtering to `true`, then you can continue using the Input facade as you normally would:
43
+
44
+
```php
45
+
Input::get('some_var');
46
+
```
47
+
48
+
The same goes for getting all inputs:
49
+
50
+
```php
51
+
Input::all();
52
+
```
53
+
54
+
However, if you don't have global xss filtering on, you can pass in a third parameter to the `get()` method:
55
+
56
+
```php
57
+
Input::get('some_var', null, true);
58
+
```
59
+
60
+
Or pass in `true` to the `all()` method:
61
+
62
+
```php
63
+
Input::all(true);
64
+
```
65
+
66
+
If you have global filtering on, you can pass `false` in as these parameters to turn off filtering for that particular callto either method.
0 commit comments