The Request->has() method is used to check if a string key exists in a list of request data keys. The new update allows the
has() method to check for multiple keys and returns false if any of the keys is not defined.
namespace spoova/mi/windows/Routes;
use spoova/mi/core/classes/Request;
use Window;
class Home extends Window {
function __construct(Request $Request) {
if($Request->has(['firstname', 'lastname'])) {
//all required keys exists.
}
}
}
The Res class now has its get(), gett(), post() and postt() methods completely removed. These
method were used initially to test route requests prior to the initial release which has seen routes handled using specially defined window logics.
The error() helper function previously returns a string value obtained from an error key when a form is submitted. This function has been remodified to
return a mixed data type. Data returned will now be dependent on the type of data obtained when an error key is supplied. Note that the error() function
is equivalent to the error() template directive.