The request function returns the current request instance or obtains an input field's value from the current request:
<?php $request = request();

$value = request('key', $default);
<?php     public function ensureLocalRequest()

    {

        $ipIsPublic = filter_var(

            request()->ip(),

            FILTER_VALIDATE_IP,

            FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE

        );