Add currency controls to API

This commit is contained in:
James Cole
2018-04-13 17:28:11 +02:00
parent 90cf7a3bf5
commit 67fa4a0fc7
8 changed files with 422 additions and 4 deletions

View File

@@ -37,6 +37,13 @@ class Request extends FormRequest
*/
public function boolean(string $field): bool
{
if ((string)$this->input($field) === 'true') {
return true;
}
if ((string)$this->input($field) === 'false') {
return false;
}
return 1 === (int)$this->input($field);
}