| $request - The form requrest information |
| |
+---------------------------------------------------------------------------+
| |
| This files saves the new information to the database | |
| |
+---------------------------------------------------------------------------+
*/
include 'Get.php';
# Validate The Request
$this->validate($request, $validator);
# Update the row
foreach ($fields as $field) {
$save = true;
# Check the field type
$type = Schema::getColumnType($table, $field);
# Get the value
$value = $request->input($field);
if ($type == 'string' or $type == 'integer') {
# Check if it's a default_random field
foreach ($default_random as $random) {
if ($random == $field) {
if (!$value) {
$value = str_random(10);
}
}
}
# Check if it's a hashed field
foreach ($hashed as $hash) {
if ($hash == $field) {
if ($value) {