Routes for React
This commit is contained in:
1 parent
20db2301cb
commit
06ce614c2b
3 files changed
+13
-9
No files matched your search
@@ -8,21 +8,25 @@ class Input
|
||||
{
|
||||
public static function post(string $index, $defaultValue = null)
|
||||
{
|
||||
return Request::request()->getInputHandler()->post($index, $defaultValue);
|
||||
$value = Request::request()->getInputHandler()->post($index, $defaultValue);
|
||||
return empty($value) ? null : $value->getValue();
|
||||
}
|
||||
|
||||
public static function patch(string $index, $defaultValue = null)
|
||||
{
|
||||
return Request::request()->getInputHandler()->post($index, $defaultValue);
|
||||
$value = Request::request()->getInputHandler()->post($index, $defaultValue);
|
||||
return empty($value) ? null : $value->getValue();
|
||||
}
|
||||
|
||||
public static function get(string $index, $defaultValue = null)
|
||||
{
|
||||
return Request::request()->getInputHandler()->get($index, $defaultValue);
|
||||
$value = Request::request()->getInputHandler()->get($index, $defaultValue);
|
||||
return empty($value) ? null : $value->getValue();
|
||||
}
|
||||
|
||||
public static function file(string $index, $defaultValue = null)
|
||||
{
|
||||
return Request::request()->getInputHandler()->file($index, $defaultValue);
|
||||
$value = Request::request()->getInputHandler()->file($index, $defaultValue);
|
||||
return empty($value) ? null : $value->getValue();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user