Inheritance: extends Illuminate\Foundation\Http\FormRequest
Example #1
0
 public function all()
 {
     $input = parent::all();
     if (isset($input['is_interest'])) {
         if ($input['is_interest'] == 'true') {
             $input['is_interest'] = true;
         }
         if ($input['is_interest'] == 'false') {
             $input['is_interest'] = false;
         }
     }
     if (isset($input['acceptance'])) {
         if ($input['acceptance'] == 'true') {
             $input['acceptance'] = true;
         }
         if ($input['acceptance'] == 'false') {
             $input['acceptance'] = false;
         }
     }
     foreach ($input as $key => $value) {
         if ($input[$key] == 'null') {
             $input[$key] = '';
         }
     }
     return $input;
 }