PHP code example of rexon / request-sanitizer
1. Go to this page and download the library: Download rexon/request-sanitizer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rexon / request-sanitizer example snippets
//Include
equest = new Request();
//Get request Array
$aData = $request->getArray();
//Get request Input name
$aData = [
'name' => $request->getInput('name'),
'address' => $request->getInput('address'),
'number' => $request->getInput('number')
];
//Get request property name according to form data inputs
$aData = [
'name' => $request->name,
'address' => $request->address,
'number' => $request->number
];
//sample method call for database insertion
User::create($aData);